Skip to content

Instantly share code, notes, and snippets.

@evallesv
Created January 7, 2021 22:42
Show Gist options
  • Save evallesv/33f9d1e112e5eb0105d988cd610ed42e to your computer and use it in GitHub Desktop.
Save evallesv/33f9d1e112e5eb0105d988cd610ed42e to your computer and use it in GitHub Desktop.
Transfer data between Sqlite databases (FAST)
#Having sqlite command line installed from https://sqlite.org/download.html
sqlite3 destination.sqlite #open database
ATTACH origin.sqlite as orig #attach the origin database
.databases #see all databases
.tables #see all tables
BEGIN TRANSACTION
INSERT INTO destTable SELECT * FROM orig.originTable;
END TRANSACTION;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment