In my SQLite
database, I got 10 tables which I want to create dump file only from three of them. I tired some of the answers from How do I dump the data of some SQLite3 tables :
sqlite> AM.db ".dump 'table1' 'table2' 'table3'"
But I get:
Usage: .dump ?LIKE-PATTERN?
I get the same error trying:
sqlite> .open AM.db
sqlite> .dump 'table1' 'table2' 'table3'
How can I create the dump file only from some tables of my database?
Edit
I also tried the command CL closed the question as duplicate for:
.mode insert <table1> <table2> <table3>
.out file.sql
select * from table1;
select * from table2;
select * from table3;
But it just create a dump with Insert
command and not Drop Table If exists
or Create
commands.