KnowledgeBoat Logo

Computer Science

Assertion. The cursor rowcount returns how many rows have been retrieved so far through fetch…() methods.

Reason. The number of rows in a resultset and the rowcount are always equal.

Python MySQL

3 Likes

Answer

(c)

Assertion is true but Reason is false.

Explanation
The cursor.rowcount returns how many rows have been so far retrieved through fetch…() methods from the cursor. However, the number of rows in a result set and the rowcount may not always be equal. This is because the rowcount attribute of the cursor only reflects the number of rows fetched by the fetch…() methods, not necessarily the total number of rows in the entire result set.

Answered By

1 Like


Related Questions