From c1c6e151e874af9e633e9e804ded1bfe393e28c2 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Thu, 11 Apr 2024 15:35:00 +0800 Subject: [PATCH] ebnf show bindings (#17033) (#17145) --- sql-statements/sql-statement-show-bindings.md | 29 +++++-------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/sql-statements/sql-statement-show-bindings.md b/sql-statements/sql-statement-show-bindings.md index dcedc7b8a4c98..b31b177c0a12c 100644 --- a/sql-statements/sql-statement-show-bindings.md +++ b/sql-statements/sql-statement-show-bindings.md @@ -9,30 +9,17 @@ The `SHOW BINDINGS` statement is used to display information about created SQL b ## Synopsis -**ShowStmt:** +```ebnf+diagram +ShowBindingsStmt ::= + "SHOW" ("GLOBAL" | "SESSION")? "BINDINGS" ShowLikeOrWhere? -![ShowStmt](/media/sqlgram/ShowStmt.png) - -**ShowTargetFilterable:** - -![ShowTargetFilterable](/media/sqlgram/ShowTargetFilterable.png) - -**GlobalScope:** - -![GlobalScope](/media/sqlgram/GlobalScope.png) - -**ShowLikeOrWhereOpt** - -![ShowLikeOrWhereOpt](/media/sqlgram/ShowLikeOrWhereOpt.png) +ShowLikeOrWhere ::= + "LIKE" SimpleExpr +| "WHERE" Expression +``` ## Syntax description -{{< copyable "sql" >}} - -```sql -SHOW [GLOBAL | SESSION] BINDINGS [ShowLikeOrWhereOpt]; -``` - This statement outputs the execution plan bindings at the GLOBAL or SESSION level. The default scope is SESSION. Currently `SHOW BINDINGS` outputs eight columns, as shown below: | Column Name | Description | @@ -49,8 +36,6 @@ This statement outputs the execution plan bindings at the GLOBAL or SESSION leve ## Examples -{{< copyable "sql" >}} - ```sql mysql> CREATE TABLE t1 ( id INT NOT NULL PRIMARY KEY auto_increment,