高效查看MySQL帮助文档的方法 (转)
在mysql的使用过程中, 可能经常会遇到以下问题:
- 某个操作语法忘记了, 如何快速查找?
- 如何快速知道当前版本上某个字段类型的取值范围?
- 当前版本都支持哪些函数?希望有例子说明..
- 当前版本是否支持某个功能?
按层次查看帮助
查看目录
- mysql> ? contents
- You asked for help about help category: "Contents"
- For more information, type 'help <item>', where <item> is one of the following
- categories:
- Account Management
- Administration
- Compound Statements
- Data Definition
- Data Manipulation
- Data Types
- Functions
- Functions and Modifiers for Use with GROUP BY
- Geographic Features
- Help Metadata
- Language Structure
- Plugins
- Procedures
- Storage Engines
- Table Maintenance
- Transactions
- User-Defined Functions
- Utility
mysql> ? contents
You asked for help about help category: "Contents"
For more information, type 'help <item>', where <item> is one of the following
categories:
Account Management
Administration
Compound Statements
Data Definition
Data Manipulation
Data Types
Functions
Functions and Modifiers for Use with GROUP BY
Geographic Features
Help Metadata
Language Structure
Plugins
Procedures
Storage Engines
Table Maintenance
Transactions
User-Defined Functions
Utility
查看数据类型
- mysql> ? data types
- You asked for help about help category: "Data Types"
- For more information, type 'help <item>', where <item> is one of the following
- topics:
- AUTO_INCREMENT
- BIGINT
- BINARY
- BIT
- BLOB
- BLOB DATA TYPE
- BOOLEAN
- CHAR
- CHAR BYTE
- DATE
- DATETIME
- DEC
- DECIMAL
- DOUBLE
- DOUBLE PRECISION
- ENUM
- FLOAT
- INT
- INTEGER
- LONGBLOB
- LONGTEXT
- MEDIUMBLOB
- MEDIUMINT
- MEDIUMTEXT
- SET DATA TYPE
- SMALLINT
- TEXT
- TIME
- TIMESTAMP
- TINYBLOB
- TINYINT
- TINYTEXT
- VARBINARY
- VARCHAR
- YEAR DATA TYPE
mysql> ? data types
You asked for help about help category: "Data Types"
For more information, type 'help <item>', where <item> is one of the following
topics:
AUTO_INCREMENT
BIGINT
BINARY
BIT
BLOB
BLOB DATA TYPE
BOOLEAN
CHAR
CHAR BYTE
DATE
DATETIME
DEC
DECIMAL
DOUBLE
DOUBLE PRECISION
ENUM
FLOAT
INT
INTEGER
LONGBLOB
LONGTEXT
MEDIUMBLOB
MEDIUMINT
MEDIUMTEXT
SET DATA TYPE
SMALLINT
TEXT
TIME
TIMESTAMP
TINYBLOB
TINYINT
TINYTEXT
VARBINARY
VARCHAR
YEAR DATA TYPE
- mysql> ? int
- Name: 'INT'
- Description:
- INT[(M)] [UNSIGNED] [ZEROFILL]
- A normal-size integer. The signed range is -2147483648 to 2147483647.
- The unsigned range is 0 to 4294967295.
- URL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html
mysql> ? int
Name: 'INT'
Description:
INT[(M)] [UNSIGNED] [ZEROFILL]
A normal-size integer. The signed range is -2147483648 to 2147483647.
The unsigned range is 0 to 4294967295.
URL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html
查看函数
- mysql> ? functions
- You asked for help about help category: "Functions"
- For more information, type 'help <item>', where <item> is one of the following
- categories:
- Bit Functions
- Comparison operators
- Control flow functions
- Date and Time Functions
- Encryption Functions
- Information Functions
- Logical operators
- Miscellaneous Functions
- Numeric Functions
- String Functions
mysql> ? functions
You asked for help about help category: "Functions"
For more information, type 'help <item>', where <item> is one of the following
categories:
Bit Functions
Comparison operators
Control flow functions
Date and Time Functions
Encryption Functions
Information Functions
Logical operators
Miscellaneous Functions
Numeric Functions
String Functions
- mysql> ? Date and Time Functions
- You asked for help about help category: "Date and Time Functions"
- For more information, type 'help <item>', where <item> is one of the following
- topics:
- ADDDATE
- ADDTIME
- CONVERT_TZ
- CURDATE
- CURRENT_DATE
- CURRENT_TIME
- CURRENT_TIMESTAMP
- CURTIME
- DATE FUNCTION
- DATEDIFF
- DATE_ADD
- DATE_FORMAT
- DATE_SUB
- DAY
- DAYNAME
- DAYOFMONTH
- DAYOFWEEK
- DAYOFYEAR
- EXTRACT
- FROM_DAYS
- FROM_UNIXTIME
- GET_FORMAT
- HOUR
- LAST_DAY
- LOCALTIME
- LOCALTIMESTAMP
- MAKEDATE
- MAKETIME
- MICROSECOND
- MINUTE
- MONTH
- MONTHNAME
- NOW
- PERIOD_ADD
- PERIOD_DIFF
- QUARTER
- SECOND
- SEC_TO_TIME
- STR_TO_DATE
- SUBDATE
- SUBTIME
- SYSDATE
- TIME FUNCTION
- TIMEDIFF
- TIMESTAMP FUNCTION
- TIMESTAMPADD
- TIMESTAMPDIFF
- TIME_FORMAT
- TIME_TO_SEC
- TO_DAYS
- TO_SECONDS
- UNIX_TIMESTAMP
- UTC_DATE
- UTC_TIME
- UTC_TIMESTAMP
- WEEK
- WEEKDAY
- WEEKOFYEAR
- YEAR
- YEARWEEK
mysql> ? Date and Time Functions
You asked for help about help category: "Date and Time Functions"
For more information, type 'help <item>', where <item> is one of the following
topics:
ADDDATE
ADDTIME
CONVERT_TZ
CURDATE
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
CURTIME
DATE FUNCTION
DATEDIFF
DATE_ADD
DATE_FORMAT
DATE_SUB
DAY
DAYNAME
DAYOFMONTH
DAYOFWEEK
DAYOFYEAR
EXTRACT
FROM_DAYS
FROM_UNIXTIME
GET_FORMAT
HOUR
LAST_DAY
LOCALTIME
LOCALTIMESTAMP
MAKEDATE
MAKETIME
MICROSECOND
MINUTE
MONTH
MONTHNAME
NOW
PERIOD_ADD
PERIOD_DIFF
QUARTER
SECOND
SEC_TO_TIME
STR_TO_DATE
SUBDATE
SUBTIME
SYSDATE
TIME FUNCTION
TIMEDIFF
TIMESTAMP FUNCTION
TIMESTAMPADD
TIMESTAMPDIFF
TIME_FORMAT
TIME_TO_SEC
TO_DAYS
TO_SECONDS
UNIX_TIMESTAMP
UTC_DATE
UTC_TIME
UTC_TIMESTAMP
WEEK
WEEKDAY
WEEKOFYEAR
YEAR
YEARWEEK
快速查阅帮助
- mysql> ? show
- Name: 'SHOW'
- Description:
- SHOW has many forms that provide information about databases, tables,
- columns, or status information about the server. This section describes
- those following:
- SHOW AUTHORS
- SHOW {BINARY | MASTER} LOGS
- SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
- SHOW CHARACTER SET [like_or_where]
- SHOW COLLATION [like_or_where]
- SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]
- SHOW CONTRIBUTORS
- SHOW CREATE DATABASE db_name
- SHOW CREATE EVENT event_name
- SHOW CREATE FUNCTION func_name
- SHOW CREATE PROCEDURE proc_name
- SHOW CREATE TABLE tbl_name
- SHOW CREATE TRIGGER trigger_name
- SHOW CREATE VIEW view_name
- SHOW DATABASES [like_or_where]
- SHOW ENGINE engine_name {STATUS | MUTEX}
- SHOW [STORAGE] ENGINES
- SHOW ERRORS [LIMIT [offset,] row_count]
- SHOW EVENTS
- SHOW FUNCTION CODE func_name
- SHOW FUNCTION STATUS [like_or_where]
- SHOW GRANTS FOR user
- SHOW INDEX FROM tbl_name [FROM db_name]
- SHOW MASTER STATUS
- SHOW OPEN TABLES [FROM db_name] [like_or_where]
- SHOW PLUGINS
- SHOW PROCEDURE CODE proc_name
- SHOW PROCEDURE STATUS [like_or_where]
- SHOW PRIVILEGES
- SHOW [FULL] PROCESSLIST
- SHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]
- SHOW PROFILES
- SHOW SLAVE HOSTS
- SHOW SLAVE STATUS
- SHOW [GLOBAL | SESSION] STATUS [like_or_where]
- SHOW TABLE STATUS [FROM db_name] [like_or_where]
- SHOW [FULL] TABLES [FROM db_name] [like_or_where]
- SHOW TRIGGERS [FROM db_name] [like_or_where]
- SHOW [GLOBAL | SESSION] VARIABLES [like_or_where]
- SHOW WARNINGS [LIMIT [offset,] row_count]
- like_or_where:
- LIKE 'pattern'
- | WHERE expr
- If the syntax for a given SHOW statement includes a LIKE 'pattern'
- part, 'pattern' is a string that can contain the SQL "%" and "_"
- wildcard characters. The pattern is useful for restricting statement
- output to matching values.
- Several SHOW statements also accept a WHERE clause that provides more
- flexibility in specifying which rows to display. See
- http://dev.mysql.com/doc/refman/5.5/en/extended-show.html.
- URL: http://dev.mysql.com/doc/refman/5.5/en/show.html
mysql> ? show
Name: 'SHOW'
Description:
SHOW has many forms that provide information about databases, tables,
columns, or status information about the server. This section describes
those following:
SHOW AUTHORS
SHOW {BINARY | MASTER} LOGS
SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
SHOW CHARACTER SET [like_or_where]
SHOW COLLATION [like_or_where]
SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]
SHOW CONTRIBUTORS
SHOW CREATE DATABASE db_name
SHOW CREATE EVENT event_name
SHOW CREATE FUNCTION func_name
SHOW CREATE PROCEDURE proc_name
SHOW CREATE TABLE tbl_name
SHOW CREATE TRIGGER trigger_name
SHOW CREATE VIEW view_name
SHOW DATABASES [like_or_where]
SHOW ENGINE engine_name {STATUS | MUTEX}
SHOW [STORAGE] ENGINES
SHOW ERRORS [LIMIT [offset,] row_count]
SHOW EVENTS
SHOW FUNCTION CODE func_name
SHOW FUNCTION STATUS [like_or_where]
SHOW GRANTS FOR user
SHOW INDEX FROM tbl_name [FROM db_name]
SHOW MASTER STATUS
SHOW OPEN TABLES [FROM db_name] [like_or_where]
SHOW PLUGINS
SHOW PROCEDURE CODE proc_name
SHOW PROCEDURE STATUS [like_or_where]
SHOW PRIVILEGES
SHOW [FULL] PROCESSLIST
SHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]
SHOW PROFILES
SHOW SLAVE HOSTS
SHOW SLAVE STATUS
SHOW [GLOBAL | SESSION] STATUS [like_or_where]
SHOW TABLE STATUS [FROM db_name] [like_or_where]
SHOW [FULL] TABLES [FROM db_name] [like_or_where]
SHOW TRIGGERS [FROM db_name] [like_or_where]
SHOW [GLOBAL | SESSION] VARIABLES [like_or_where]
SHOW WARNINGS [LIMIT [offset,] row_count]
like_or_where:
LIKE 'pattern'
| WHERE expr
If the syntax for a given SHOW statement includes a LIKE 'pattern'
part, 'pattern' is a string that can contain the SQL "%" and "_"
wildcard characters. The pattern is useful for restricting statement
output to matching values.
Several SHOW statements also accept a WHERE clause that provides more
flexibility in specifying which rows to display. See
http://dev.mysql.com/doc/refman/5.5/en/extended-show.html.
URL: http://dev.mysql.com/doc/refman/5.5/en/show.html
- mysql> ? concat
- Name: 'CONCAT'
- Description:
- Syntax:
- CONCAT(str1,str2,...)
- Returns the string that results from concatenating the arguments. May
- have one or more arguments. If all arguments are nonbinary strings, the
- result is a nonbinary string. If the arguments include any binary
- strings, the result is a binary string. A numeric argument is converted
- to its equivalent string form. This is a nonbinary string as of MySQL
- 5.5.3. Before 5.5.3, it is a binary string; to to avoid that and
- produce a nonbinary string, you can use an explicit type cast, as in
- this example:
- SELECT CONCAT(CAST(int_col AS CHAR), char_col);
- CONCAT() returns NULL if any argument is NULL.
- URL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html
- Examples:
- mysql> SELECT CONCAT('My', 'S', 'QL');
- -> 'MySQL'
- mysql> SELECT CONCAT('My', NULL, 'QL');
- -> NULL
- mysql> SELECT CONCAT(14.3);
- -> '14.3'
mysql> ? concat
Name: 'CONCAT'
Description:
Syntax:
CONCAT(str1,str2,...)
Returns the string that results from concatenating the arguments. May
have one or more arguments. If all arguments are nonbinary strings, the
result is a nonbinary string. If the arguments include any binary
strings, the result is a binary string. A numeric argument is converted
to its equivalent string form. This is a nonbinary string as of MySQL
5.5.3. Before 5.5.3, it is a binary string; to to avoid that and
produce a nonbinary string, you can use an explicit type cast, as in
this example:
SELECT CONCAT(CAST(int_col AS CHAR), char_col);
CONCAT() returns NULL if any argument is NULL.
URL: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html
Examples:
mysql> SELECT CONCAT('My', 'S', 'QL');
-> 'MySQL'
mysql> SELECT CONCAT('My', NULL, 'QL');
-> NULL
mysql> SELECT CONCAT(14.3);
-> '14.3'
- mysql> ? create table
- Name: 'CREATE TABLE'
- Description:
- Syntax:
- CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
- (create_definition,...)
- [table_options]
- [partition_options]
- Or:
- CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
- [(create_definition,...)]
- [table_options]
- [partition_options]
- select_statement
- Or:
- CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
- { LIKE old_tbl_name | (LIKE old_tbl_name) }
- ......
mysql> ? create table
Name: 'CREATE TABLE'
Description:
Syntax:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
(create_definition,...)
[table_options]
[partition_options]
Or:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
[(create_definition,...)]
[table_options]
[partition_options]
select_statement
Or:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
{ LIKE old_tbl_name | (LIKE old_tbl_name) }
......
- mysql> ? grant
- Name: 'GRANT'
- Description:
- Syntax:
- GRANT
- priv_type [(column_list)]
- [, priv_type [(column_list)]] ...
- ON [object_type] priv_level
- TO user_specification [, user_specification] ...
- [REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}]
- [WITH with_option ...]
- GRANT PROXY ON user_specification
- TO user_specification [, user_specification] ...
- [WITH GRANT OPTION]
- object_type:
- TABLE
- | FUNCTION
- | PROCEDURE
- ......
mysql> ? grant
Name: 'GRANT'
Description:
Syntax:
GRANT
priv_type [(column_list)]
[, priv_type [(column_list)]] ...
ON [object_type] priv_level
TO user_specification [, user_specification] ...
[REQUIRE {NONE | ssl_option [[AND] ssl_option] ...}]
[WITH with_option ...]
GRANT PROXY ON user_specification
TO user_specification [, user_specification] ...
[WITH GRANT OPTION]
object_type:
TABLE
| FUNCTION
| PROCEDURE
......
下面把查看手册和官方资料的地址献上, 就把衣钵都传给你们了, 别忘了给个赞哦~
常用的网络资源
可以下载到各个版本的MySQL以及相关客户端开发工具等.
或者向MySQL提交bug报告
高效查看MySQL帮助文档的方法 (转)的更多相关文章
- 高效查看MySQL帮助文档的方法
在mysql的使用过程中, 可能经常会遇到以下问题: 某个操作语法忘记了, 如何快速查找? 如何快速知道当前版本上某个字段类型的取值范围? 当前版本都支持哪些函数?希望有例子说明.. 当前版本是否支持 ...
- MySQL帮助文档的使用
帮助文档使用 在 MySQL 使用过程中,可能经常会遇到以下问题: 某个操作语法忘记了,需要快速查找. 当前版本上,某个字段类型我们想快速知道它的取值范围? 当前版本上,都支持哪些函数?希望有例子能快 ...
- python快速生成注释文档的方法
python快速生成注释文档的方法 今天将告诉大家一个简单平时只要注意的小细节,就可以轻松生成注释文档,也可以检查我们写的类方法引用名称是否重复有问题等.一看别人专业的大牛们写的文档多牛多羡慕,不用担 ...
- 如何在命令行模式下查看Python帮助文档---dir、help、__doc__
如何在命令行模式下查看Python帮助文档---dir.help.__doc__ 1.dir函数式可以查看对象的属性,使用方法很简单,举str类型为例,在Python命令窗口输入 dir(str) 即 ...
- C#实现通过模板自动创建Word文档的方法
原文地址:http://www.jb51.net/article/55332.htm 本文实例讲述了C#实现通过模板自动创建Word文档的方法,是非常实用的技巧.分享给大家供大家参考.具体实现方法 ...
- 程序生成word与PDF文档的方法(python)
程序导出word文档的方法 将web/html内容导出为world文档,再java中有很多解决方案,比如使用Jacob.Apache POI.Java2Word.iText等各种方式,以及使用free ...
- 在命令行模式下查看Python帮助文档---dir、help、__doc__
在命令行模式下查看Python帮助文档---dir.help.__doc__ 1.dir函数式可以查看对象的属性,使用方法很简单,举str类型为例,在Python命令窗口输入 dir(str) 即 ...
- 四种生成和解析XML文档的方法详解(介绍+优缺点比较+示例)
众所周知,现在解析XML的方法越来越多,但主流的方法也就四种,即:DOM.SAX.JDOM和DOM4J 下面首先给出这四种方法的jar包下载地址 DOM:在现在的Java JDK里都自带了,在xml- ...
- help python(查看模块帮助文档)
查看模块帮助文档: help(len) -- docs for the built in len function (note here you type "len" not &q ...
随机推荐
- (转发)RequestDispatcher的include()方法和forward()方法的区别
forward(): 该方法用于将请求从一个Servlet传递给服务器上的另外的Servlet.JSP页面或者是HTML文件. 在Servlet中,可以对请求做一个初步的处理,然后调用这个方法,将请求 ...
- cocos 射线检测 3D物体 (Sprite3D点击)
看了很多朋友问怎么用一个3D物体做一个按钮,而且网上好像还真比较难找到答案, 今天翻了一下cocos源码发现Ray 已经封装了intersects函数,那么剩下的工作其实很简单了, 从屏幕的一个poi ...
- RabbitMq学习一入门篇(hello world)
简介 RabbitMQ是一个开源的AMQP实现,服务器端用Erlang语言编写,支持多种客户端,如:Python.Ruby..NET.Java,也是众多消息队列中表现不俗的一员,作用就是提高系统的并发 ...
- Struts2入门项目开发小步骤
Step1: Struts2的获取和添加到项目中: 在官方网站:http://struts.apache.org 获取Struts的其中一个版本. 在开发项目之前,需要添加struts2的类库支持,也 ...
- Java调度实现
根据自己在项目中用到的调度,简单说说:(如有不正确的地方,请留言...) Java调度:他是用来解决访问时间慢的手段. 通俗的讲就是为需要的数据(你需要展示的数据)建立一张中间表存放,提前把数据读出来 ...
- HTML5之placeholder属性以及如何更改placeholder属性中文字颜色
今天在群里看到群友问了一个这样的问题,就是如何更改placeholder属性中文字的颜色,以前用过这属性,却是没更改过颜色,于是便试了试,中途遇到些问题,查找资料后特来总结一下. 熟悉HTML5的人应 ...
- Spring源码情操陶冶-AbstractApplicationContext#registerBeanPostProcessors
承接前文Spring源码情操陶冶-AbstractApplicationContext#invokeBeanFactoryPostProcessors 瞧瞧官方注释 /** * Instantiate ...
- SpringMVC+MyBatis 事务管理一
前言 spring事务管理包含两种情况,编程式事务.声明式事务.而声明式事务又包括基于注解@Transactional和tx+aop的方式.那么本文先分析编程式注解事务和基于注解的声明式事务. 编程式 ...
- 【整理】01. localhost_access_log 记录post请求参数
环境:apache-tomcat-7.0.57 利用Filter过去request请求参数 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...
- efcore 配置链接sqlserver 记录
本文将在asp.net core api 项目中使用efcore corefirst模式 简单配置链接sqlserver数据库,以及简单的数据库迁移操作 一 新建项目 1. 首先我们先用vs2017 ...