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
廣告