views:

310

answers:

1

Hello, I have 2 sqlite DBs with common data but with different purposes and I wanted to avoid reinserting data, so I was wondering if it was possible to copy a hole table from one DB to another. I didn't find anything about this on google regarding sqlite DB's so my hopes are not hi.

Thank you,

+3  A: 

You'll have to attach Database X with Database Y using the Attach command, then run the appropriate Insert Into commands for the tables you want to transfer.

INSERT INTO X.TABLE(Id, Value) SELECT * FROM Y.TABLE;
JeremySpouken
http://www.sqlite.org/lang_attach.html
jleedev
Thank you very much!
Reonarudo