Articles → Python → Read data from Sqlite table using python
Read data from Sqlite table using python
Example
import sqlite3
conn = sqlite3.connect('c:\sqlite\SchoolDB.db')
cursor = conn.execute("SELECT * from Departments")
for row in cursor:
print (row[0])
print (row[1])
conn.close()
Output
Click to Enlarge