Skip to content

Instantly share code, notes, and snippets.

@zaghaghi
Created October 23, 2017 10:05
Show Gist options
  • Save zaghaghi/1bd4bb4c65f0cbfdd3ead0c40f9ff897 to your computer and use it in GitHub Desktop.
Save zaghaghi/1bd4bb4c65f0cbfdd3ead0c40f9ff897 to your computer and use it in GitHub Desktop.
How to insert table data from another database
sqlite> ATTACH "transcription.gt.db" as gt;
sqlite> select count(*) from gt.transcriptions;
10417
sqlite> select count(*) from transcriptions;
0
sqlite> insert into transcriptions select * from gt.transcriptions;
sqlite> select count(*) from transcriptions;
10417
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment