Skip to content

Commit f4f1042

Browse files
pythongh-95273: Condense sqlite3 executescript example
1 parent 2361908 commit f4f1042

File tree

2 files changed

+8
-27
lines changed

2 files changed

+8
-27
lines changed

Doc/includes/sqlite3/executescript.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

Doc/library/sqlite3.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,9 +1007,15 @@ Cursor Objects
10071007

10081008
*sql_script* must be a :class:`string <str>`.
10091009

1010-
Example:
1010+
Example::
10111011

1012-
.. literalinclude:: ../includes/sqlite3/executescript.py
1012+
cur.executescript("""
1013+
begin;
1014+
create table person(firstname, lastname, age);
1015+
create table book(title, author, published);
1016+
create table publisher(name, address);
1017+
commit;
1018+
""")
10131019

10141020

10151021
.. method:: fetchone()

0 commit comments

Comments
 (0)