CBSE Class 12 Computer Science Question 15 of 47

Interface Python with SQL — Question 5

Back to all questions
5
Question

Question 5

Name the method which is used for displaying only one record from the result set.

  1. fetchmany()
  2. fetchno()
  3. fetchall()
  4. fetchone()
Answer

fetchone()

Reason — The fetchone() method fetches only one record from the result set in the form of a tuple or a list.