MySQL 8.4 发行说明
- 15.7.7.1 SHOW BINARY LOG STATUS 语句
- 15.7.7.2 SHOW BINARY LOGS 语句
- 15.7.7.3 SHOW BINLOG EVENTS 语句
- 15.7.7.4 SHOW CHARACTER SET 语句
- 15.7.7.5 SHOW COLLATION 语句
- 15.7.7.6 SHOW COLUMNS 语句
- 15.7.7.7 SHOW CREATE DATABASE 语句
- 15.7.7.8 SHOW CREATE EVENT 语句
- 15.7.7.9 SHOW CREATE FUNCTION 语句
- 15.7.7.10 SHOW CREATE PROCEDURE 语句
- 15.7.7.11 SHOW CREATE TABLE 语句
- 15.7.7.12 SHOW CREATE TRIGGER 语句
- 15.7.7.13 SHOW CREATE USER 语句
- 15.7.7.14 SHOW CREATE VIEW 语句
- 15.7.7.15 SHOW DATABASES 语句
- 15.7.7.16 SHOW ENGINE 语句
- 15.7.7.17 SHOW ENGINES 语句
- 15.7.7.18 SHOW ERRORS 语句
- 15.7.7.19 SHOW EVENTS 语句
- 15.7.7.20 SHOW FUNCTION CODE 语句
- 15.7.7.21 SHOW FUNCTION STATUS 语句
- 15.7.7.22 SHOW GRANTS 语句
- 15.7.7.23 SHOW INDEX 语句
- 15.7.7.24 SHOW OPEN TABLES 语句
- 15.7.7.25 SHOW PARSE_TREE 语句
- 15.7.7.26 SHOW PLUGINS 语句
- 15.7.7.27 SHOW PRIVILEGES 语句
- 15.7.7.28 SHOW PROCEDURE CODE 语句
- 15.7.7.29 SHOW PROCEDURE STATUS 语句
- 15.7.7.30 SHOW PROCESSLIST 语句
- 15.7.7.31 SHOW PROFILE 语句
- 15.7.7.32 SHOW PROFILES 语句
- 15.7.7.33 SHOW RELAYLOG EVENTS 语句
- 15.7.7.34 SHOW REPLICA STATUS 语句
- 15.7.7.35 SHOW REPLICAS 语句
- 15.7.7.36 SHOW STATUS 语句
- 15.7.7.37 SHOW TABLE STATUS 语句
- 15.7.7.38 SHOW TABLES 语句
- 15.7.7.39 SHOW TRIGGERS 语句
- 15.7.7.40 SHOW VARIABLES 语句
- 15.7.7.41 SHOW WARNINGS 语句
SHOW
有许多形式可以提供有关数据库、表、列或服务器状态信息的信息。本节介绍以下内容
SHOW BINARY LOG STATUS
SHOW BINARY LOGS
SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
SHOW {CHARACTER SET | CHARSET} [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 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 REPLICA STATUS [FOR CHANNEL channel]
SHOW REPLICAS
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
语句的语法包含 LIKE '
部分,则 pattern
''
是一个可以包含 SQL pattern
'%
和 _
通配符的字符串。该模式对于将语句输出限制为匹配值很有用。
几个 SHOW
语句也接受 WHERE
子句,该子句提供了更多灵活性来指定要显示哪些行。参见 第 28.8 节,“SHOW 语句扩展”。
在 SHOW
语句结果中,用户名和主机名用反引号 (`) 括起来。
许多 MySQL API(例如 PHP)使您能够像对待来自 SELECT
的结果集一样对待从 SHOW
语句返回的结果;参见 第 31 章,连接器和 API,或您的 API 文档以获取更多信息。此外,您可以在 SQL 中使用对 INFORMATION_SCHEMA
数据库中表的查询结果进行操作,而这在 SHOW
语句的结果中是无法轻松完成的。参见 第 28 章,INFORMATION_SCHEMA 表。