HELP 命令

句法

MariaDB [(none)]> HELP search_string

描述

HELP 命令能在任何MariaDB / MySQL 客户端使用,比如 mysql 命令行客户端。能从这个帮助中获得几乎所有 mysql 命令和函数的句法和一个简短的描述。

如果你向 help 命令行提供参数,那么 mysql 客户端将会使用你提供的参数从服务器上查找相关内容。这个命令的使用需要在mysql数据库服务端初始化的时候安装包含有 help 帮助主题的数据表。

如果没有找到匹配的字符串,那么查找将会显示下面的内容:

MariaDB [(none)]> HELP something

Nothing found
Please try to run 'help contents' for a list of all accessible topics

使用 help contents 命令来查看帮助的分类:

MariaDB [(none)]> 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
   Compound Statements
   Data Definition
   Data Manipulation
   Data Types
   Functions
   Functions and Modifiers for Use with GROUP BY
   Geographic Features
   Language Structure
   Plugins
   Table Maintenance
   Transactions
   User-Defined Functions
   Utility

如果查找的字符串包含有多次,那么 mysql 将会显示找到的列表:

MariaDB [(none)]> help create
Many help items for your request exist.
To make a more specific request, please type 'help <item>',
where <item> is one of the following
topics:
   CREATE DATABASE
   CREATE EVENT
   CREATE FUNCTION
   CREATE FUNCTION UDF
   CREATE INDEX
   CREATE PROCEDURE
   CREATE SERVER
   CREATE TABLE
   CREATE TABLESPACE
   CREATE TRIGGER
   CREATE USER
   CREATE VIEW
   SHOW
   SHOW CREATE DATABASE
   SHOW CREATE EVENT
   SHOW CREATE FUNCTION
   SHOW CREATE PROCEDURE
   SHOW CREATE TABLE
   SPATIAL

使用一个完整查找字符来查看所有的详细信息。

帮助文档随 MariaDB 提供,存有帮助内容的数据库表可以从mysql_install_db或者 fill_help_table.sql脚本导入。

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.