How to Fetch data from tables in python?

Category: PythonHow to Fetch data from tables in python?
Editor">Editor Staff asked 2 years ago

How to Fetch data from tables in python?

1 Answers
Editor">Editor Staff answered 2 years ago

After executing the SQL statement for reading records from a table, either of the following methods can be used to retrieve them in python.
fetchone: It retrieves one record at a time in the form of a tuple.
fetchall: It retrieves all fetched records at a point in the form of tuple of tuples.