Small. Fast. Reliable.
Choose any three.

SQLite里的SQL
SQL As Understood By SQLite

[Top]

DETACH DATABASE

detach-stmt:

syntax diagram detach-stmt

这个命令用于删除之前用ATTACH命令附加到数据库连接上的附加数据库。如果没有使用共享缓存模式,那么可能会出现多次使用不同名字来附加同一个数据库,那么卸载一个连接名会保持其他的连接名不动。在共享缓存模式下,多次附加同一个数据库会导致错误。如果在一个事物中使用该命令会失败。
This statement detaches an additional database connection previously attached using the ATTACH statement. When not in shared cache mode, it is possible to have the same database file attached multiple times using different names, and detaching one connection to a file will leave the others intact.

In shared cache mode, attempting to attach the same database file more than once results in an error.

This statement will fail if SQLite is in the middle of a transaction.