This video is based on how data is being Inserted with python in sql.
import mysql.connector
mycon=mysql.connector.connect(host="localhost",user="root",passwd="1234",database="school")
if mycon.is_connected()==False:
print("error in connecting")
else:
print("connecting to the databse")
cursor=mycon.cursor()
sql = "INSERT INTO Student (name,class,sec,rollno,marks,adm_no,phno,salary) VALUES (%s, %s,%s,%s,%s,%s,%s,%s)"
val = [("s2s","11","m1","101100","3045","1010","189","141"),
("s3s","11","m1","10200","9087","1020","189","141")]
cursor.executemany(sql, val)
print("insertion done")
mycon.commit()
mycon.close()
On this page of the site you can watch the video online INSERT DATA WITH PYTHON IN SQL with a duration of hours minute second in good quality, which was uploaded by the user Mitika Kohli 22 February 2022, share the link with friends and acquaintances, this video has already been watched 367 times on youtube and it was liked by 19 viewers. Enjoy your viewing!