Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sqlite3
- conn = sqlite3.connect("example.db")
- cursor = conn.cursor()
- sql = ''' CREATE TABLE people (
- id INTEGER PRIMARY_KEY AUTO_INCREMENT,
- firstName TEXT NOT NULL,
- lastName TEXT NOT NULL,
- age INTEGER NOT NULL
- )'''
- cursor.execute(sql)
- conn.commit()
- print(cursor.execute("SELECT * from people").fetchall())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement