mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
Documentation for .duplicate(), refs #449
This commit is contained in:
parent
4af4762521
commit
da030d49fd
2 changed files with 18 additions and 5 deletions
|
|
@ -678,6 +678,19 @@ Here's an example that uses these features:
|
|||
# [score] INTEGER NOT NULL DEFAULT 1
|
||||
# )
|
||||
|
||||
.. _python_api_duplicate:
|
||||
|
||||
Duplicating tables
|
||||
==================
|
||||
|
||||
The ``table.duplicate()`` method creates a copy of the table, copying both the table schema and all of the rows in that table:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
db["authors"].duplicate("authors_copy")
|
||||
|
||||
The new ``authors_copy`` table will now contain a duplicate copy of the data from ``authors``.
|
||||
|
||||
.. _python_api_bulk_inserts:
|
||||
|
||||
Bulk inserts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue