Answer:
fetchall()
Explanation:
MySQLCursor object method fetchall() method returns all the rows in the resultset.
For example:
>>> cursor.execute("SELECT * FROM Student ORDER BY rollno")
>>> rows = cursor.fetchall()
Now rows will contain a reference to the results of the query. If the size of the resultset returned by the query is 0 then rows will reference an empty set.
fetchmany() and fetchone() are , on the other hand , used to retrieve many(count specified) or one row from the result respectively.