Q. The books table of test database contains the records shown below:-


Title ISBN
Die to Live 78127873915
Again? 23686286243
Ushakaal 12678987036
Ushakiran 42568987036

What will be the output produced by following code:


import mysql.connector as sqltor.
conn = sqltor.connect (host = "localhost", user = "learner", passwd = "fast", database = "test")
cursor = conn.cursor()
cursor.execute("SELECT * FROM books")
row = cursor.fetchone()
while row is not None:
    print (row)
    row = cursor.fetchone()

Answer :-

(Die to Live 78127873915)
(Again?        23686286243)
(Ushakaal     12678987036)
(ushakiran    42568987036)

1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post