First page Back Continue Last page Overview Graphics

Inquiring Data

cursor.execute("SELECT company, contact_person FROM customer")

e = cursor.fetchall()

print(e)

e = cursor.fetchone()

print(e)

Results:

$ python sqlite.py

[(u'Informix', u'Jean Forrestier'), (u'Knoblix', u'Frank Meyer')]

(u'Informix', u'Jean Forrestier')