Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: bde44876de7a12838a3e83735b1f5d88380d3877 authored by Barry Warsaw on 18 October 2009, 16:50:06 UTC
Bump to 2.6.4rc2
Tip revision: bde4487
execsql_printall_1.py
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()
back to top