Skip to content

Commit

Permalink
Added Deletion code
Browse files Browse the repository at this point in the history
  • Loading branch information
Piwoksn committed Sep 18, 2024
1 parent c6b6935 commit 5cf6e91
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions deleting_from_mysql.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import mysql.connector as mysql

db = mysql.connect(
host = "localhost",
user = "root",
passwd = input("Enter Password: "),
db = "mccoy"
)

cursor = db.cursor()

statement = "DELETE FROM People where Name= 'Noble Piwoks'"

cursor.execute(statement)

db.commit()

print("Row(s) deleted")

0 comments on commit 5cf6e91

Please sign in to comment.