CBSE Class 12 Computer Science Question 31 of 46

Interface Python with MySQL — Question 8

Back to all questions
8
Question

Question 8

To fetch multiple records from the resultset, you may use <cursor>. ............... method.

  1. fetch()
  2. fetchmany()
  3. fetchmultiple()
  4. fetchmore()
Answer

fetchmany()

Reason — The <cursor>.fetchmany(<n>) method will return only the <n> number of rows from the resultset in the form of a tuple containing the records.