Something like:
Var dbh as sqlitedatabase
// Here, connect dbh to your source database
dbh.ExecuteSQL ("attach database '/path/to/second/db' as db2")
dbh.ExecuteSQL ("create table db2.tablename as select * from main.tablename")
dbh.ExecuteSQL ("insert into db2.tablename select * from main.tablename")
.
is what you want. I do this all the time, although in my case I’m moving a single row from one database to another.
tablename is whatever the name of your table to be copied is.