2014-01-17 71 views
0

这个特定的数据库名为temp,我想删除它是使用ubuntu机器上的SQLite创建的。我该如何删除这个数据库?删除SQLite数据库:如何?

+1

SQLite数据库只是文件。您可以通过删除文件来删除数据库。参考:http://www.sqlite.org/about.html – bernie

+0

这些文件将在ubuntu中出现在哪里? – dmn

+0

删除文件。档案在哪里?使用它的程序放置它。 – bgusach

回答

0

这种情况很简单。

要么删除这样的文件:

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退出。

就是这么简单