Database 删除SQLite数据库:如何删除?
我想删除一个名为temp的数据库,它是在ubuntu机器上使用SQLite创建的。如何删除此数据库?粘贴stackoverflow链接供您参考。这可能有用Database 删除SQLite数据库:如何删除?,database,sqlite,Database,Sqlite,我想删除一个名为temp的数据库,它是在ubuntu机器上使用SQLite创建的。如何删除此数据库?粘贴stackoverflow链接供您参考。这可能有用 情况很简单 按如下方式删除文件: rm -fr filename 或者在终端类型中,类似于: $ sqlite3 tempfile (where tempfile is the name of the file) sqlite> SELECT * FROM sqlite_master WHERE type='table'; 例如,
情况很简单 按如下方式删除文件:
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退出
简单的SQLite数据库就是文件。您可以通过删除文件来删除数据库。参考:ubuntu中的文件将出现在哪里?删除该文件。档案在哪里?使用它的程序将其放置在何处。