From 40fc603510f5cc983bb5b5d8fc852118da6e605f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Mon, 8 Apr 2024 11:17:05 +0200 Subject: [PATCH 1/2] ebnf show databases --- sql-statements/sql-statement-show-databases.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sql-statements/sql-statement-show-databases.md b/sql-statements/sql-statement-show-databases.md index 1f23b95796221..43f7ab903e370 100644 --- a/sql-statements/sql-statement-show-databases.md +++ b/sql-statements/sql-statement-show-databases.md @@ -11,13 +11,14 @@ This statement shows a list of databases that the current user has privileges to ## Synopsis -**ShowDatabasesStmt:** - -![ShowDatabasesStmt](/media/sqlgram/ShowDatabasesStmt.png) - -**ShowLikeOrWhereOpt:** +``` +ShowDatabasesStmt ::= + "SHOW" "DATABASES" ShowLikeOrWhere? -![ShowLikeOrWhereOpt](/media/sqlgram/ShowLikeOrWhereOpt.png) +ShowLikeOrWhere ::= + "LIKE" SimpleExpr +| "WHERE" Expression +``` ## Examples @@ -58,3 +59,4 @@ The `SHOW DATABASES` statement in TiDB is fully compatible with MySQL. If you fi * [SHOW SCHEMAS](/sql-statements/sql-statement-show-schemas.md) * [DROP DATABASE](/sql-statements/sql-statement-drop-database.md) * [CREATE DATABASE](/sql-statements/sql-statement-create-database.md) +* [`information_schema.schemata`](/information-schema/information-schema-schemata.md) From bfb9e77c337065224cf81328732f5b4d852ecd88 Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 10 Apr 2024 17:52:28 +0800 Subject: [PATCH 2/2] Apply suggestions from code review --- sql-statements/sql-statement-show-databases.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql-statements/sql-statement-show-databases.md b/sql-statements/sql-statement-show-databases.md index 43f7ab903e370..74a58ded4eb93 100644 --- a/sql-statements/sql-statement-show-databases.md +++ b/sql-statements/sql-statement-show-databases.md @@ -11,7 +11,7 @@ This statement shows a list of databases that the current user has privileges to ## Synopsis -``` +```ebnf+diagram ShowDatabasesStmt ::= "SHOW" "DATABASES" ShowLikeOrWhere? @@ -59,4 +59,4 @@ The `SHOW DATABASES` statement in TiDB is fully compatible with MySQL. If you fi * [SHOW SCHEMAS](/sql-statements/sql-statement-show-schemas.md) * [DROP DATABASE](/sql-statements/sql-statement-drop-database.md) * [CREATE DATABASE](/sql-statements/sql-statement-create-database.md) -* [`information_schema.schemata`](/information-schema/information-schema-schemata.md) +* [`INFORMATION_SCHEMA.SCHEMATA`](/information-schema/information-schema-schemata.md)