Test Index
Interface of Python with SQL Database
© examsnet.com
Question : 8 of 10
Marks:
+1,
-0
fetchone() method fetches only one row in a ResultSet and returns a __________.[CBSE 2023 Compartment]
Solution:
Concept:After
cursor.execute(), the result set is read with fetchone(), fetchmany(n) or fetchall().Explanation:fetchone() returns the next row as a tuple (or None when no rows are left), for example (101, 'Amit', 85).fetchall() and fetchmany() return a list of such tuples.Answer:Option A (Tuple)© examsnet.com
Go to Question: