You can also attach other sqlite databases which might make it easier.<p><pre><code>    attach database &#x27;old-database.sqlite3&#x27; as old;
    insert into dbtable ( id, name ) select id, name from old.dbtable;
</code></pre>
Then you don&#x27;t need to use Python to iterate through each row.