Updated on 2025-10-23 GMT+08:00

cursor.fetchall()

Description

This method obtains all the (remaining) rows of the query result and returns them as a list of tuples.

Prototype

cursor.fetchall()

Parameters

None

Return Value

Tuple list, which contains all results of the result set. An empty list is returned when no rows are available.

Examples

For details, see Examples: Common Operations.