First page Back Continue Last page Overview Graphics

Communicating with the Data Base

import sqlite3

connection = sqlite3.connect("accounts.db")

cursor = connection.cursor()

cursor.execute("""CREATE TABLE customer (

cust_number INTEGER, company TEXT, contact_person TEXT)""")

The execute method is used to send SQL statements to the SQLite database.