I have SQLite databases named database1 with a table t1 and database2 with a table t2. I want to import table t2 from database2 into database1. What command(s) should I use?
I have SQLite databases named database1 with a table t1 and database2 with a
Share
Open
database2with thesqlite3command-line tool and read the table definition with the command.schema t2.(Alternatively, use any other tool that allows to read the table definition.)
Then open
database1, attach the other database with the command:then create the table
t2, and copy the data over with: