view Doc/includes/sqlite3/executescript.py @ 50401:7239fbcdcd4f 3.0

Merged revisions 68103 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r68103 | benjamin.peterson | 2008-12-31 08:51:07 -0600 (Wed, 31 Dec 2008) | 1 line #4406 Directory has to inherit from commondialog.Dialog ........
author Benjamin Peterson <benjamin@python.org>
date Wed, 31 Dec 2008 14:54:48 +0000
parents 9e1529bf0442
children
line wrap: on
line source

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
    );
    """)