我想删除一个名为temp的数据库,它是在ubuntu机器上使用SQLite创建的。如何删除此数据库?
发布于 2014-01-17 16:54:32
情况很简单。
可以像这样删除该文件:
rm -fr filename
或者在终端类型中,类似于:
$ sqlite3 tempfile (where tempfile is the name of the file)
sqlite> SELECT * FROM sqlite_master WHERE type='table';
例如,您将看到如下所示的表列表:
table|friends|friends|2|CREATE TABLE friends (id int)
然后只需键入
sqlite> drop table friends (or the name you want to drop)
然后按ctrl-d退出。
就这么简单
发布于 2014-01-17 15:35:33
粘贴stackoverflow链接以供参考。这可能是有用的how to drop database in sqlite?
https://stackoverflow.com/questions/21179984
复制相似问题