Windows 将SQL追加到SQLite.dump

Windows 将SQL追加到SQLite.dump,windows,sqlite,shell,Windows,Sqlite,Shell,有没有办法让sqlite在执行.dump时输出额外的SQL以删除数据库(如果存在) 我想到的一个选项是,在执行.dump命令时,是否可以以某种方式手动附加“drop database if exist”。但是,我不熟悉windows shell脚本,希望得到一些建议 谢谢 试试看: .output dump.sql SELECT 'DROP DATABASE IF EXIST ...'; .dump .output stdout 使用文字是个好主意。不幸的是,SQLite不支持DROP数据库。

有没有办法让sqlite在执行.dump时输出额外的SQL以删除数据库(如果存在)

我想到的一个选项是,在执行.dump命令时,是否可以以某种方式手动附加“drop database if exist”。但是,我不熟悉windows shell脚本,希望得到一些建议

谢谢

试试看:

.output dump.sql
SELECT 'DROP DATABASE IF EXIST ...';
.dump
.output stdout

使用文字是个好主意。不幸的是,SQLite不支持DROP数据库。