MYSQL入门学习之十七:MYSQL命令行内可使用的命令详细说明
相关链接:
MYSQL入门学习之一:基本操作
http://www.2cto.com/database/201212/173868.html
MYSQL入门学习之二:使用正则表达式搜索
http://www.2cto.com/database/201212/173869.html
MYSQL入门学习之三:全文本搜索
http://www.2cto.com/database/201212/173873.html
MYSQL入门学习之四:MYSQL的数据类型
http://www.2cto.com/database/201212/175536.html
MYSQL入门学习之五:MYSQL的字符集
http://www.2cto.com/database/201212/175541.html
MYSQL入门学习之六:MYSQL的运算符
http://www.2cto.com/database/201212/175862.html
MYSQL入门学习之七:MYSQL常用函数
http://www.2cto.com/database/201212/175864.html
MYSQL入门学习之八:
数据库及表的基本操作
http://www.2cto.com/database/201212/175867.
html
MYSQL入门学习之九:索引的简单操作
http://www.2cto.com/database/201212/176772.html
MYSQL入门学习之十:视图的基本操作
http://www.2cto.com/database/201212/176775.html
MYSQL入门学习之十一:触发器的基本操作
http://www.2cto.com/database/201212/176781.html
MYSQL入门学习之十二:存储过程的基本操作
http://www.2cto.com/database/201212/177380.html
MYSQL入门学习之十三:自定义函数的基本操作
http://www.2cto.com/database/201212/177382.html
MYSQL入门学习之十四:游标的基本操作
http://www.2cto.com/database/201212/177384.html
MYSQL入门学习之十五:事务处理的基本操作
http://www.2cto.com/database/201212/177385.html
MYSQL入门学习之十六:MYSQL命令参数详解
http://www.2cto.com/database/201212/178079.html
在MYSQL命令行中,有一些非常实用的小命令可以使用。
进行MYSQL命令行后,输入\h,可查看MYSQL命令行支持的小命令及对应的功能说明:
[sql] www.2cto.com
mysql> \h
For information about MySQL products and services, visit:
http://www.mysql.com/
For developer information, including the MySQL Reference Manual, visit:
http://dev.mysql.com/
To buy MySQL Network Support, training, or other products, visit:
https://shop.mysql.com/
List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
(\ ) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as new 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.
For server side help, type 'help contents'
这段输出主要包含两部分信息:
第一部分为MYSQL客户端相关的小命令,其对应的中文翻译如下:
(\ )
显示帮助信息。与\h的功能相同
clear
(\c)
不执行当前正在输入的命令。若\c前已包含命令分隔符,则命令分隔符之前的部分仍然执行。
delimiter
(\d)
修改命令分隔符
ego
(\G)
将命令的结果以垂直的形式显示
exit