diff --git a/media/sqlgram/CharsetKw.png b/media/sqlgram/CharsetKw.png index 93766c08a14d..d3ca449930d8 100644 Binary files a/media/sqlgram/CharsetKw.png and b/media/sqlgram/CharsetKw.png differ diff --git a/media/sqlgram/CharsetName.png b/media/sqlgram/CharsetName.png index 8584cc53bfc6..5de51401f29d 100644 Binary files a/media/sqlgram/CharsetName.png and b/media/sqlgram/CharsetName.png differ diff --git a/media/sqlgram/CharsetNameOrDefault.png b/media/sqlgram/CharsetNameOrDefault.png index 4c2ae3fa67d0..871cea190bce 100644 Binary files a/media/sqlgram/CharsetNameOrDefault.png and b/media/sqlgram/CharsetNameOrDefault.png differ diff --git a/media/sqlgram/DBName.png b/media/sqlgram/DBName.png index ddbd106c1733..263fefd9b460 100644 Binary files a/media/sqlgram/DBName.png and b/media/sqlgram/DBName.png differ diff --git a/media/sqlgram/FieldsOrColumns.png b/media/sqlgram/FieldsOrColumns.png index cab8f639750a..1b42f89d01c8 100644 Binary files a/media/sqlgram/FieldsOrColumns.png and b/media/sqlgram/FieldsOrColumns.png differ diff --git a/media/sqlgram/SetNamesStmt.png b/media/sqlgram/SetNamesStmt.png new file mode 100644 index 000000000000..381e0ea7cbad Binary files /dev/null and b/media/sqlgram/SetNamesStmt.png differ diff --git a/media/sqlgram/ShowColumnsFilterable.png b/media/sqlgram/ShowColumnsFilterable.png new file mode 100644 index 000000000000..6bc80f109abd Binary files /dev/null and b/media/sqlgram/ShowColumnsFilterable.png differ diff --git a/media/sqlgram/ShowCreateSequenceStmt.png b/media/sqlgram/ShowCreateSequenceStmt.png new file mode 100644 index 000000000000..6f60823db474 Binary files /dev/null and b/media/sqlgram/ShowCreateSequenceStmt.png differ diff --git a/media/sqlgram/ShowDatabaseNameOpt.png b/media/sqlgram/ShowDatabaseNameOpt.png index 09a6e2d85de8..8065db22195f 100644 Binary files a/media/sqlgram/ShowDatabaseNameOpt.png and b/media/sqlgram/ShowDatabaseNameOpt.png differ diff --git a/media/sqlgram/ShowLikeOrWhereOpt.png b/media/sqlgram/ShowLikeOrWhereOpt.png index 6f2c4d125db8..f68b2d4c1a59 100644 Binary files a/media/sqlgram/ShowLikeOrWhereOpt.png and b/media/sqlgram/ShowLikeOrWhereOpt.png differ diff --git a/media/sqlgram/ShowStmt.png b/media/sqlgram/ShowStmt.png index 292453a56ce5..967ec2a42dc1 100644 Binary files a/media/sqlgram/ShowStmt.png and b/media/sqlgram/ShowStmt.png differ diff --git a/media/sqlgram/ShowTableAliasOpt.png b/media/sqlgram/ShowTableAliasOpt.png index b17e5382145d..2e599f1104fd 100644 Binary files a/media/sqlgram/ShowTableAliasOpt.png and b/media/sqlgram/ShowTableAliasOpt.png differ diff --git a/media/sqlgram/StringName.png b/media/sqlgram/StringName.png index 5a62002d5e03..263fefd9b460 100644 Binary files a/media/sqlgram/StringName.png and b/media/sqlgram/StringName.png differ diff --git a/media/sqlgram/VariableAssignment.png b/media/sqlgram/VariableAssignment.png index 4e488f83f155..6dee3c5dd560 100644 Binary files a/media/sqlgram/VariableAssignment.png and b/media/sqlgram/VariableAssignment.png differ diff --git a/media/sqlgram/VariableAssignmentList.png b/media/sqlgram/VariableAssignmentList.png new file mode 100644 index 000000000000..fa110accf258 Binary files /dev/null and b/media/sqlgram/VariableAssignmentList.png differ diff --git a/sql-statements/sql-statement-set-names.md b/sql-statements/sql-statement-set-names.md index b29621d3e836..4b0ef0c5fa06 100644 --- a/sql-statements/sql-statement-set-names.md +++ b/sql-statements/sql-statement-set-names.md @@ -11,9 +11,33 @@ aliases: ['/docs-cn/dev/reference/sql/statements/set-names/'] ## 语法图 -**SetStmt:** +**SetNamesStmt:** -![SetStmt](/media/sqlgram/SetStmt.png) +![SetNamesStmt](/media/sqlgram/SetNamesStmt.png) + +**VariableAssignmentList:** + +![VariableAssignmentList](/media/sqlgram/VariableAssignmentList.png) + +**VariableAssignment:** + +![VariableAssignment](/media/sqlgram/VariableAssignment.png) + +**CharsetName:** + +![CharsetName](/media/sqlgram/CharsetName.png) + +**StringName:** + +![StringName](/media/sqlgram/StringName.png) + +**CharsetKw:** + +![CharsetKw](/media/sqlgram/CharsetKw.png) + +**CharsetNameOrDefault:** + +![CharsetNameOrDefault](/media/sqlgram/CharsetNameOrDefault.png) ## 示例 diff --git a/sql-statements/sql-statement-show-columns-from.md b/sql-statements/sql-statement-show-columns-from.md index 696dc8407b68..0c255635e0fd 100644 --- a/sql-statements/sql-statement-show-columns-from.md +++ b/sql-statements/sql-statement-show-columns-from.md @@ -17,14 +17,42 @@ aliases: ['/docs-cn/dev/reference/sql/statements/show-columns-from/'] ![ShowStmt](/media/sqlgram/ShowStmt.png) -**ShowTargetFilterable:** +**ShowColumnsFilterable:** -![ShowTargetFilterable](/media/sqlgram/ShowTargetFilterable.png) +![ShowColumnsFilterable](/media/sqlgram/ShowColumnsFilterable.png) **OptFull:** ![OptFull](/media/sqlgram/OptFull.png) +**FieldsOrColumns:** + +![FieldsOrColumns](/media/sqlgram/FieldsOrColumns.png) + +**ShowTableAliasOpt:** + +![ShowTableAliasOpt](/media/sqlgram/ShowTableAliasOpt.png) + +**FromOrIn:** + +![FromOrIn](/media/sqlgram/FromOrIn.png) + +**TableName:** + +![TableName](/media/sqlgram/TableName.png) + +**ShowDatabaseNameOpt:** + +![ShowDatabaseNameOpt](/media/sqlgram/ShowDatabaseNameOpt.png) + +**DBName:** + +![DBName](/media/sqlgram/DBName.png) + +**ShowLikeOrWhereOpt:** + +![ShowLikeOrWhereOpt](/media/sqlgram/ShowLikeOrWhereOpt.png) + ## 示例 {{< copyable "sql" >}} @@ -139,7 +167,7 @@ show full columns from mysql.user; +-----------------------+---------------+-------------+------+------+---------+-------+---------------------------------+---------+ | Host | char(64) | utf8mb4_bin | NO | PRI | NULL | | select,insert,update,references | | | User | char(32) | utf8mb4_bin | NO | PRI | NULL | | select,insert,update,references | | -| Password | char(41) | utf8mb4_bin | YES | | NULL | | select,insert,update,references | | +| authentication_string | text | utf8mb4_bin | YES | | NULL | | select,insert,update,references | | | Select_priv | enum('N','Y') | utf8mb4_bin | NO | | N | | select,insert,update,references | | | Insert_priv | enum('N','Y') | utf8mb4_bin | NO | | N | | select,insert,update,references | | | Update_priv | enum('N','Y') | utf8mb4_bin | NO | | N | | select,insert,update,references | | @@ -166,8 +194,12 @@ show full columns from mysql.user; | Create_role_priv | enum('N','Y') | utf8mb4_bin | NO | | N | | select,insert,update,references | | | Drop_role_priv | enum('N','Y') | utf8mb4_bin | NO | | N | | select,insert,update,references | | | Account_locked | enum('N','Y') | utf8mb4_bin | NO | | N | | select,insert,update,references | | +| Shutdown_priv | enum('N','Y') | utf8mb4_bin | NO | | N | | select,insert,update,references | | +| Reload_priv | enum('N','Y') | utf8mb4_bin | NO | | N | | select,insert,update,references | | +| FILE_priv | enum('N','Y') | utf8mb4_bin | NO | | N | | select,insert,update,references | | +| Config_priv | enum('N','Y') | utf8mb4_bin | NO | | N | | select,insert,update,references | | +-----------------------+---------------+-------------+------+------+---------+-------+---------------------------------+---------+ -29 rows in set (0.00 sec) +33 rows in set (0.01 sec) ``` ## MySQL 兼容性 diff --git a/sql-statements/sql-statement-show-create-sequence.md b/sql-statements/sql-statement-show-create-sequence.md index ba58a2d472bb..09c959c72fa8 100644 --- a/sql-statements/sql-statement-show-create-sequence.md +++ b/sql-statements/sql-statement-show-create-sequence.md @@ -11,9 +11,9 @@ aliases: ['/docs-cn/dev/reference/sql/statements/show-create-sequence/'] ## 语法图 -**ShowStmt:** +**ShowCreateSequenceStmt:** -![ShowStmt](/media/sqlgram/ShowStmt.png) +![ShowCreateSequenceStmt](/media/sqlgram/ShowCreateSequenceStmt.png) **TableName:** @@ -48,7 +48,7 @@ SHOW CREATE SEQUENCE seq; ## MySQL 兼容性 -MySQL 暂无序列选项。TiDB 序列借鉴自 MariaDB。`SETVAL` 函数的步调是 TiDB 特有的,其他函数的步调与 MariaDB 保持一致。 +MySQL 暂无序列选项。TiDB 序列部分借鉴自 MariaDB。`SETVAL` 函数的步调是 TiDB 特有的,其他函数的步调与 MariaDB 保持一致。 ## 另请参阅