退出 SQLite 3 数据库 [英] Exit a SQLite 3 database
问题描述
我在 SUSE Linux 中有一个 SQLite 3 数据库.
I have an SQLite 3 database in SUSE Linux.
它像这样卡在命令提示符处:
It's stuck at the command prompt like so:
sqlite> q
...> exit
...> .exit
...> quit
...> .quit
如何退出数据库?
推荐答案
Type ; + Enter 终止当前语句到目前为止不是一个有效的声明,但没关系).然后.quit
+ 回车.
Type ; + Enter to terminate the current statement (will give an error message because what you typed so far is not a valid statement but never mind). Then .quit
+ Enter.
请注意,在 SQLite 3 中,SQL 语句必须以分隔符终止,默认情况下为 ;
.以 .
开头的非 SQL 命令不需要以这种方式终止,但只要按下 Enter,它们就被认为是完整的.
Note that in SQLite 3, SQL statements must be terminated with a delimiter, which is ;
by default. The non-SQL commands, which start with a .
, do not need to be terminated this way, but they are considered complete as soon as Enter is pressed.
如果命令不以 .
开头,并且在没有 SQL 终止字符的情况下按下 Enter,CLI 客户端将显示继续提示";(...>
在您的情况下)并期望 SQL 命令在下一行继续执行,直到它正确终止.
If a command does not start with a .
and Enter is pressed without the SQL termination character, the CLI client displays the "continuation prompt" (...>
in your case) and expects the SQL command to be continued on the following line(s) until it is properly terminated.
另请参阅SQLite 的命令行外壳.
这篇关于退出 SQLite 3 数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!