I have SQLite databases named database1 with a table t1 and database2 with a table t2. I want to import table t2
database1
t1
database2
t2
Shell command:
sqlite3 database1
In SQLite shell:
sqlite> ATTACH 'database2' AS db2; sqlite> CREATE TABLE t1 AS SELECT * FROM db2.t2;