2014-01-17 92 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退出。

就是這麼簡單