Computer Science
Which command is used for cleaning up the environment?
- my.closed()
- is.end()
- con.quit()
- mycon.close()
Python MySQL
1 Like
Answer
mycon.close()
Reason — The mycon.close() command is used for cleaning up the environment by closing the database connection.
Answered By
1 Like
Related Questions
Name the host name used for signing in the database.
- localhost
- localpost
- localcost
- none of these
The command used for modifying the records is:
- update()
- add()
- updateall()
- none of these
Which function of connection is used to check whether connection to MySQL is successfully done or not?
import mysql.connector as mycon con = mycon.connect #ConnectionString if ...............: print("Connected!") else: print("Error! Not Connected")- con.connected()
- con.isconnected()
- con.is_connected()
- con.is_connect()
Identify the correct statement to create cursor:
import mysql.connector as msq con = msq.connect() #ConnectionString mycursor = ...............- con.cursor()
- con.create_cursor()
- con.open_cursor()
- con.get_cursor()