### 13.7.7 SHOW 语句

[13.7.7.1 SHOW BINARY LOGS 语句](show-binary-logs.html)
[13.7.7.2 SHOW BINLOG EVENTS 语句](show-binlog-events.html)
[13.7.7.3 SHOW CHARACTER SET 语句](show-character-set.html)
[13.7.7.4 SHOW COLLATION 语句](show-collation.html)
[13.7.7.5 SHOW COLUMNS 语句](show-columns.html)
[13.7.7.6 SHOW CREATE DATABASE 语句](show-create-database.html)
[13.7.7.7 SHOW CREATE EVENT 语句](show-create-event.html)
[13.7.7.8 SHOW CREATE FUNCTION 语句](show-create-function.html)
[13.7.7.9 SHOW CREATE PROCEDURE 语句](show-create-procedure.html)
[13.7.7.10 SHOW CREATE TABLE 语句](show-create-table.html)
[13.7.7.11 SHOW CREATE TRIGGER 语句](show-create-trigger.html)
[13.7.7.12 显示创建用户语句](show-create-user.html)
[13.7.7.13 SHOW CREATE VIEW 语句](show-create-view.html)
[13.7.7.14 SHOW DATABASES 语句](show-databases.html)
[13.7.7.15 SHOW ENGINE 语句](show-engine.html)
[13.7.7.16 SHOW ENGINES 语句](show-engines.html)
[13.7.7.17 SHOW ERRORS 语句](show-errors.html)
[13.7.7.18 SHOW EVENTS 语句](show-events.html)
[13.7.7.19 显示函数代码语句](show-function-code.html)
[13.7.7.20 SHOW FUNCTION STATUS 语句](show-function-status.html)
[13.7.7.21 SHOW GRANTS 语句](show-grants.html)
[13.7.7.22 SHOW INDEX 语句](show-index.html)
[13.7.7.23 SHOW MASTER STATUS 语句](show-master-status.html)
[13.7.7.24 SHOW OPEN TABLES 语句](show-open-tables.html)
[13.7.7.25 SHOW PLUGINS 语句](show-plugins.html)
[13.7.7.26 SHOW PRIVILEGES 语句](show-privileges.html)
[13.7.7.27 显示过程代码语句](show-procedure-code.html)
[13.7.7.28 SHOW PROCEDURE STATUS 语句](show-procedure-status.html)
[13.7.7.29显示PROCESSLIST语句](show-processlist.html)
[13.7.7.30展示简介声明](show-profile.html)
[13.7.7.31显示配置文件声明](show-profiles.html)
[13.7.7.32显示RELAYLOG事件声明](show-relaylog-events.html)
[13.7.7.33显示副本声明](show-replicas.html)
[13.7.7.34显示从主机|显示副本声明](show-slave-hosts.html)
[13.7.7.35显示副本状态声明](show-replica-status.html)
[13.7.7.36显示从机|副本状态声明](show-slave-status.html)
[13.7.7.37显示状态声明](show-status.html)
[13.7.7.38显示表格状态声明](show-table-status.html)
[13.7.7.39显示报表](show-tables.html)
[13.7.7.40显示触发语句](show-triggers.html)
[13.7.7.41显示变量语句](show-variables.html)
[13.7.7.42显示警告声明](show-warnings.html)

[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)[](<>)

[`显示`](show.html)有许多表单，提供有关数据库、表、列的信息或有关服务器的状态信息。本节介绍了以下内容：

```
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 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 RELAYLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
SHOW {REPLICAS | SLAVE HOSTS}
SHOW {REPLICA | SLAVE} STATUS [FOR CHANNEL channel]
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
}
```

如果给定的[`显示`](show.html)声明包括[`就像*`图案`*'`](string-comparison-functions.html#operator_like)部分`'*`图案`*'`是一个可以包含SQL语句的字符串`%`和`_`通配符。该模式用于将语句输出限制为匹配值。

几个[`显示`](show.html)声明也接受`哪里`子句，它在指定要显示的行时提供了更大的灵活性。看见[第26.8节，“显示语句的扩展”](extended-show.html).

在里面[`显示`](show.html)语句结果、用户名和主机名使用倒勾（\`）引用。

许多MySQL API（如PHP）允许您处理从[`显示`](show.html)语句，就像您从[`选择`](select.html); 看见[第29章，*连接器和API*](connectors-apis.html)，或您的API文档以获取更多信息。此外，您还可以在SQL中使用对中的表进行查询的结果`信息模式`数据库，您无法轻松处理来自[`显示`](show.html)声明。看见[第26章，*信息\_模式表*](information-schema.html).
