Q. Write a program to delete the employee record whose name is read from keyboard at execution time.


Answer = 


import mysql.connector as a
db = a.connect(host="localhost",user="root",password="computer", database = "portal_express")

cursor = db.cursor() 
name = input("Enter Employee name = ")
cursor.execute("delete from Path_wala where name = { } ".formate(name))
db.commit() 
db.close()



1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. write a program to update the record of employees by increasering the salary by rupees 1,000 for all those employees who are getting salary less than rupees50,000

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post