ยปCore Development>Code coverage>Doc/includes/sqlite3/execsql_printall_1.py

Python code coverage for Doc/includes/sqlite3/execsql_printall_1.py

#countcontent
1n/aimport sqlite3
2n/a
3n/a# Create a connection to the database file "mydb":
4n/acon = sqlite3.connect("mydb")
5n/a
6n/a# Get a Cursor object that operates in the context of Connection con:
7n/acur = con.cursor()
8n/a
9n/a# Execute the SELECT statement:
10n/acur.execute("select * from people order by age")
11n/a
12n/a# Retrieve all rows as a sequence and print that sequence:
13n/aprint(cur.fetchall())