日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

mysql命令行,多行命令時如何取消/返回修改前邊的命令

 云中凌 2014-11-28

mysql命令行中執(zhí)行多行命令時,如果前邊輸入的命令發(fā)生錯誤,是無法返回修改的,但是可以通過輸入\c來取消前邊的輸入,但是這時如果前邊輸入的東西很多,直接取消又很可惜的話,可以通過\p來打印出前邊的命令,復(fù)制下來去修改,然后輸入\c取消來重新輸入命令。

Example
1
2
3
4
5
6
7
8
9
10
11
12
13
mysql> select 8 from a
    -> where 1=1
    ->  and 1=0
    -> \p
#輸入\p后,打印出了前邊的命令。
--------------
select 8 from a
where 1=1
 and 1=0
--------------
#依然進入->狀態(tài),等待輸入,輸入\c,取消當(dāng)前輸入。
    -> \c
mysql>

下表列出了各個提示符并簡述它們所表示的mysql的狀態(tài):

提示符 含義
mysql> 準備好接受新命令。
-> 等待多行命令的下一行。
‘> 等待下一行,等待以單引號(“’”)開始的字符串的結(jié)束。
“> 等待下一行,等待以雙引號(“””)開始的字符串的結(jié)束。
`> 等待下一行,等待以反斜點(‘`’)開始的識別符的結(jié)束。
/*> 等待下一行,等待以/*開始的注釋的結(jié)束。

mysql help列表

         (\?) Synonym for `help'.
clear     (\c) Clear the current input statement.
connect   (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter.
ego       (\G) Send command to mysql server, display result vertically.
exit      (\q) Exit mysql. Same as quit.
go        (\g) Send command to mysql server.
help      (\h) Display this help.
notee     (\t) Don't write into outfile.
print     (\p) Print current command.
prompt    (\R) Change your mysql prompt.
quit      (\q) Quit mysql.
rehash    (\#) Rebuild completion hash.
source    (\.) Execute an SQL script file. Takes a file name as an argument.
status    (\s) Get status information from the server.
tee       (\T) Set outfile [to_outfile]. Append everything into given outfile.
use       (\u) Use another database. Takes database name as argument.
charset   (\C) Switch to another charset. Might be needed for processing binlog
with multi-byte charsets.
warnings  (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多