This Question asked in CBSE SQP 2021
Differentiate between fetchone() and fetchall () methods with suitable examples for each.
Answer:
Fetchone( ) |
Fetchall( ) |
Fetches one row from the resultset. It will return None if there are no more rows in the resultset. |
Fetches all the rows from the resultset. An empty list is returned if there is no record in the resultset. |
Example:
|
Example:
|