仅从某些SQLite表创建转储文件

时间:2016-01-20 07:36:22

标签: database sqlite dump

在我的SQLite数据库中,我有10个表,我只想从其中三个创建转储文件。我厌倦了How do I dump the data of some SQLite3 tables的一些答案:

sqlite> AM.db ".dump 'table1' 'table2' 'table3'"

但我明白了:

  

用法:.dump?LIKE-PATTERN?

我尝试了同样的错误:

sqlite> .open AM.db 
sqlite> .dump 'table1' 'table2' 'table3'

如何仅从数据库的某些表创建转储文件?

修改

我也尝试过命令CL将问题视为重复:

.mode insert <table1> <table2> <table3>
.out file.sql 
select * from table1;
select * from table2;
select * from table3;

但它只是使用Insert命令而不是Drop Table If existsCreate命令创建转储。

0 个答案:

没有答案
相关问题