I have two different SQLite databases XXX and YYY.
XXX contains table A and YYY contains B respectively.
A and B have same structure(columns).
How to append the rows of B in A in Python – SQLite API.
After appending A contains rows of A and rows of B.
I have two different SQLite databases XXX and YYY. XXX contains table A and
Share
You first get a connection to the database using
sqlite3.connect, then create a cursor so you can execute sql. Once you have a cursor, you can execute arbitrary sql commands.Example:
Caveat: I haven’t actually tested this, so it might have a few bugs in it, but the basic idea is sound, I think.