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