Extra Questions

 

Extra Questions 

Q.1)





Answer:


cn = mycon.connect(host='Admin', user='Learner', password='fast', database='Main')
cr = cn.cursor()
cr.execute("INSERT INTO customer (CustomerID, CustomerName, City, BillAmt, MobileNo)
VALUES (%s, %s, %s, %s, %s)", (cust_id, cust_name, city, ba, mno))

cn.commit()





Q.2)




Answer:


import mysql.connector


mycursor = con.cursor()


mycursor.execute(query)



con.commit()


con.commit()

Q.3)





Answer:


cn = mycon.connect(host="Admin", user="Learner", password="fast", database="Main")


cr = cn.cursor()


cr.execute("INSERT INTO customer VALUES (%s, %s, %s, %s, %s)", (cust_id, cust_name, city, ba, mno))


cn.commit()


















Extra Questions Extra Questions Reviewed by Shubham Prajapati on January 31, 2025 Rating: 5

No comments:

If you have any doubt so you can comment me then i will 100% help you ,Through comment Chat

Powered by Blogger.