CBSE Class 12 Computer Science Question 39 of 47

Interface Python with SQL — Question 2

Back to all questions
2
Question

Question 2

Use fetchall() method to retrieve only one value from a database table.

Answer

False

Reason — The fetchall() method retrieves all the rows in a result set and returns a list of tuples. On the other hand, the fetchone() method fetches only one row from the result set in the form of a tuple or a list.