Computer Science
To fetch one record from the resultset, you may use <cursor>. …………… method.
- fetch()
- fetchone()
- fetchtuple()
- none of these
Python MySQL
2 Likes
Answer
fetchone()
Reason — The <cursor>.fetchone()
method will return only one row from the resultset in the form of a tuple containing a record.
Answered By
1 Like
Related Questions
Which of the following is not a legal method for fetching records from database from within Python?
- fetchone()
- fetchtwo()
- fetchall()
- fetchmany()
To obtain all the records retrieved, you may use <cursor>. …………… method.
- fetch()
- fetchmany()
- fetchall()
- fetchmultiple()
To fetch multiple records from the resultset, you may use <cursor>. …………… method.
- fetch()
- fetchmany()
- fetchmultiple()
- fetchmore()
To run an SQL query from within Python, you may use <cursor>. …………… method().
- query()
- execute()
- run()
- all of these