From 847221bb7c04a60a12a477dfb53565da8421a40e Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Thu, 11 Apr 2024 15:30:29 +0800 Subject: [PATCH] ebnf show databases (#17031) (#17151) --- 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..74a58ded4eb93 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:** +```ebnf+diagram +ShowDatabasesStmt ::= + "SHOW" "DATABASES" ShowLikeOrWhere? -![ShowDatabasesStmt](/media/sqlgram/ShowDatabasesStmt.png) - -**ShowLikeOrWhereOpt:** - -![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)