Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database 删除SQLite数据库:如何删除?_Database_Sqlite - Fatal编程技术网

Database 删除SQLite数据库:如何删除?

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'; 例如,

我想删除一个名为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';
例如,您将看到如下表格列表:

table|friends|friends|2|CREATE TABLE friends (id int)
那就打字吧

sqlite> drop table friends (or the name you want to drop)
然后按ctrl-d退出


简单的SQLite数据库就是文件。您可以通过删除文件来删除数据库。参考:ubuntu中的文件将出现在哪里?删除该文件。档案在哪里?使用它的程序将其放置在何处。