Showing the changes to sys/src/cmd/python/Doc/lib/sqlite3/executescript.py (1 of 3706 files). Show all
Unified · Split
| @@ -0,0 +1,24 @@ | ||
| 1 | +import sqlite3 | |
| 2 | + | |
| 3 | +con = sqlite3.connect(":memory:") | |
| 4 | +cur = con.cursor() | |
| 5 | +cur.executescript(""" | |
| 6 | + create table person( | |
| 7 | + firstname, | |
| 8 | + lastname, | |
| 9 | + age | |
| 10 | + ); | |
| 11 | + | |
| 12 | + create table book( | |
| 13 | + title, | |
| 14 | + author, | |
| 15 | + published | |
| 16 | + ); | |
| 17 | + | |
| 18 | + insert into book(title, author, published) | |
| 19 | + values ( | |
| 20 | + 'Dirk Gently''s Holistic Detective Agency', | |
| 21 | + 'Douglas Adams', | |
| 22 | + 1987 | |
| 23 | + ); | |
| 24 | + """) | |