summaryrefslogtreecommitdiffstats
path: root/Doc/lib/sqlite3/executescript.py
blob: 0795b47a34aedf8ef1a65b80339cb8eec53eae05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import sqlite3

con = sqlite3.connect(":memory:")
cur = con.cursor()
cur.executescript("""
    create table person(
        firstname,
        lastname,
        age
    );

    create table book(
        title,
        author,
        published
    );

    insert into book(title, author, published)
    values (
        'Dirk Gently''s Holistic Detective Agency
        'Douglas Adams',
        1987
    );
    """)