Q. Explain what the following query will do?
import mysql.connector db = mysql.connector.connect(….) cursor = db.cursor() person_id = input("Enter required person id") lastname = input("Enter required lastname") db.execute("INSERT INTO staff (person_id, lastname) VALUES ({}, ‘{}’) ". format (person_id, lastname)) db.commit() db.close()
Answer =
This above program insert a new records in table
staff such that person_id and lastname are input by user . when program has run
.
Thank you so much
ReplyDeleteWelecome : )
DeleteThank you sir for your help nd for making such a beneficial website
ReplyDeleteWelcome : )
DeleteWhat is the exact output.
ReplyDeleteoutput--
Delete>>>
pls give me the exact output for this
ReplyDeleteand I am MM.NATHGIRI
>>>
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )