mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Move the 2.6 reST doc tree in place.
This commit is contained in:
parent
f56181ff53
commit
8ec7f65613
445 changed files with 136056 additions and 0 deletions
13
Doc/includes/sqlite3/execsql_printall_1.py
Normal file
13
Doc/includes/sqlite3/execsql_printall_1.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
import sqlite3
|
||||
|
||||
# Create a connection to the database file "mydb":
|
||||
con = sqlite3.connect("mydb")
|
||||
|
||||
# Get a Cursor object that operates in the context of Connection con:
|
||||
cur = con.cursor()
|
||||
|
||||
# Execute the SELECT statement:
|
||||
cur.execute("select * from people order by age")
|
||||
|
||||
# Retrieve all rows as a sequence and print that sequence:
|
||||
print cur.fetchall()
|
Loading…
Add table
Add a link
Reference in a new issue