On Jun 8, 2010, at 12:07 PM, Adam DeVita wrote: > start by doing an open db1 (as main) > then attach path to db2 as 'db2' > > insert into main.table_one_name select * from db2.table_one_name ; > > This selects all records from db2 and puts them into db1 in one > statement.
I've been reading about the ATTACH DATABASE cmd, but was confused by the documentation's warnings about main and temp dbs, namings, and transactions using :memory:. I'll take a closer look. Thanks! Scott > > Adam > On Tue, Jun 8, 2010 at 3:02 PM, Scott Frankel > <fran...@circlesfx.com> wrote: > >> >> Hi all, >> >> What's the best way to copy data from one db to another? >> >> Given 2 databases with identical schemas, one full of data and the >> other empty, the brute force way would be to perform selects on the >> source db, then for each row, perform an insert into the destination >> db. Is there a more efficient way? >> >> Thanks in advance! >> Scott >> >> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > > > > -- > VerifEye Technologies Inc. > 905-948-0015x245 > 7100 Warden Ave, Unit 3 > Markham ON, L3R 8B5 > Canada > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users