From b9b9901728f342610b473ef5cc6fd10ccc23694a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Fri, 10 May 2024 12:04:36 +0200 Subject: [PATCH 1/2] Update set-operators --- functions-and-operators/set-operators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions-and-operators/set-operators.md b/functions-and-operators/set-operators.md index e5177dcf7012a..13cee2a56dca2 100644 --- a/functions-and-operators/set-operators.md +++ b/functions-and-operators/set-operators.md @@ -116,7 +116,7 @@ TiDB supports using parentheses to specify the precedence of set operations. Exp ## Use `ORDER BY` and `LIMIT` -TiDB supports using [`ORDER BY`](/media/sqlgram/OrderByOptional.png) or [`LIMIT`](/media/sqlgram/LimitClause.png) clause in set operations. These two clauses must be at the end of the entire statement. +TiDB supports using `ORDER BY` and `LIMIT` clause in set operations. These two clauses must be at the end of the entire statement. ```sql (SELECT * FROM t1 UNION ALL SELECT * FROM t1 INTERSECT SELECT * FROM t2) ORDER BY a LIMIT 2; From c837b35c4c74f6c4949e473e9cd2315ab0ca0465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Mon, 20 May 2024 08:52:25 +0200 Subject: [PATCH 2/2] Update functions-and-operators/set-operators.md Co-authored-by: Aolin --- functions-and-operators/set-operators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions-and-operators/set-operators.md b/functions-and-operators/set-operators.md index 13cee2a56dca2..2c1f869e8e515 100644 --- a/functions-and-operators/set-operators.md +++ b/functions-and-operators/set-operators.md @@ -116,7 +116,7 @@ TiDB supports using parentheses to specify the precedence of set operations. Exp ## Use `ORDER BY` and `LIMIT` -TiDB supports using `ORDER BY` and `LIMIT` clause in set operations. These two clauses must be at the end of the entire statement. +TiDB supports using `ORDER BY` or `LIMIT` clause on the entire result of set operations. These two clauses must be at the end of the entire statement. ```sql (SELECT * FROM t1 UNION ALL SELECT * FROM t1 INTERSECT SELECT * FROM t2) ORDER BY a LIMIT 2;