mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
gh-95432: Fixup sqlite3 tutorial example (#95431)
- the insert statement should have five placeholders, not four - missing ... in the multiline row list
This commit is contained in:
parent
a739ee412c
commit
2fbee85931
1 changed files with 5 additions and 5 deletions
|
@ -79,11 +79,11 @@ Now, let us insert three more rows of data,
|
|||
using :meth:`~Cursor.executemany`::
|
||||
|
||||
>>> data = [
|
||||
('2006-03-28', 'BUY', 'IBM', 1000, 45.0),
|
||||
('2006-04-05', 'BUY', 'MSFT', 1000, 72.0),
|
||||
('2006-04-06', 'SELL', 'IBM', 500, 53.0),
|
||||
]
|
||||
>>> cur.executemany('INSERT INTO stocks VALUES(?, ?, ?, ?)', data)
|
||||
... ('2006-03-28', 'BUY', 'IBM', 1000, 45.0),
|
||||
... ('2006-04-05', 'BUY', 'MSFT', 1000, 72.0),
|
||||
... ('2006-04-06', 'SELL', 'IBM', 500, 53.0),
|
||||
... ]
|
||||
>>> cur.executemany('INSERT INTO stocks VALUES(?, ?, ?, ?, ?)', data)
|
||||
|
||||
Then, retrieve the data by iterating over the result of a ``SELECT`` statement::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue