Practical Sample Paper
Practical Sample Paper
Practical Sample Paper
1 |P A G E
import mysql.connector as mydb
mycon = mydb.connect(host='localhost',
user = 'root' ,
passwd = 'password',
database = 'school')
cur = mycon.cursor()
#inserting record
sql1 = ____________________________________
cur.execute(sql1)
mycon.commit()
#updating record
sql2 = ___________________________________
cur.execute(sql2)
mycon.commit()
#deleting record
sql3 = ____________________________________
cur.execute(sql3)
mycon.commit()
sql4 = ____________________________________
cur.execute(sql4)
d = cur.fetchall()
for rec in d:
print(rec)
mycon.close()
Signature Signature
Internal Examiner External Examiner
Name : Name:
Date : Date :
Examiner No. : Examiner No. :
---------------------------------------------------------------------------------------------------------------
2 |P A G E