Test Index

Interface of Python with SQL Database Get it on Google PlayDownload on the App Store CBSE Board Videos

© examsnet.com
Question : 7 of 10
Marks: +1, -0
fetchall() method fetches all rows in a result set and returns a :
[CBSE 2023 Set 4]
Solution:  
Concept:
In Python-MySQL connectivity, each row of the result is returned as a tuple.
Explanation:
fetchone() returns one row as a tuple; fetchall() returns all the remaining rows as a list of tuples:
[(101, 'Ravi', 5000), (102, 'Asha', 6000)]
Answer:
Option B (List of tuples)
© examsnet.com
Advertisements
Go to Question: