MySQL - HELP 语句
MySQL HELP 语句
HELP 语句用于从 MySQL 官方文档中检索有关指定字符串的信息。
语法
以下是 HELP 语句 -
HELP 'search_string'
示例
以下查询检索 MySQL 在线文档的内容列表 -
HELP '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 Components Compound Statements Contents Data Definition Data Manipulation Data Types Functions Geographic Features Help Metadata Language Structure Plugins Storage Engines Table Maintenance Transactions User-Defined Functions Utility
以下查询检索官方在线文档中指定的 MySQL 数据库的数据类型列表 -
HELP '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
您还可以通过将函数名称指定为search_string来获取内置函数的文档,如下所示 -
Name: 'LCASE' Description: Syntax: LCASE(str) LCASE() is a synonym for LOWER(). URL: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html
以下查询检索有关USE查询的信息-
help 'use' Name: 'USE' Description: Syntax: USE db_name The USE statement tells MySQL to use the named database as the default (current) database for subsequent statements. This statement requires some privilege for the database or some object within it. The named database remains the default until the end of the session or another USE statement is issued: USE db1; SELECT COUNT(*) FROM mytable; # selects from db1.mytable USE db2; SELECT COUNT(*) FROM mytable; # selects from db2.mytable The database name must be specified on a single line. Newlines in database names are not supported. URL: https://dev.mysql.com/doc/refman/8.0/en/use.html
以下查询检索官方在线文档中指定的 MySQL 数据库的功能列表 -
help 'functions' You asked for help about help category: "Functions" For more information, type 'help <item>', where <item> is one of the following categories: Aggregate Functions and Modifiers Bit Functions Cast Functions and Operators Comparison Operators Control Flow Functions Date and Time Functions Encryption Functions Enterprise Encryption Functions GROUP BY Functions and Modifiers GTID Information Functions Internal Functions Locking Functions Logical Operators Miscellaneous Functions Numeric Functions Performance Schema Functions Spatial Functions String Functions Window Functions XML