From 96f22a5bcc8aef0159805337319d767c54208243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steve-=E9=87=91=E5=8B=87?= Date: Tue, 15 Dec 2020 18:55:52 +0800 Subject: [PATCH] Update limit.md Update translation of LIMIT , and providing more details for with ties modifier. Make document more human-readable for Chinese. --- docs/zh/sql-reference/statements/select/limit.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/zh/sql-reference/statements/select/limit.md b/docs/zh/sql-reference/statements/select/limit.md index b079248deca..d6d827552b0 100644 --- a/docs/zh/sql-reference/statements/select/limit.md +++ b/docs/zh/sql-reference/statements/select/limit.md @@ -14,7 +14,7 @@ toc_title: LIMIT ## LIMIT … WITH TIES 修饰符 {#limit-with-ties} -如果为 `LIMIT n[,m]` 设置了 `WITH TIES` ,并且声明了 `ORDER BY expr_list`, you will get in result first `n` or `n,m` rows and all rows with same `ORDER BY` fields values equal to row at position `n` for `LIMIT n` and `m` for `LIMIT n,m`. +如果为 `LIMIT n[,m]` 设置了 `WITH TIES` ,并且声明了 `ORDER BY expr_list`, 除了得到无修饰符的结果(正常情况下的 `limit n`, 前n行数据), 还会返回与第`n`行具有相同排序字段的行(即如果第n+1行的字段与第n行 拥有相同的排序字段,同样返回该结果. 此修饰符可以与: [ORDER BY … WITH FILL modifier](../../../sql-reference/statements/select/order-by.md#orderby-with-fill) 组合使用. @@ -38,7 +38,7 @@ SELECT * FROM ( └───┘ ``` -单子执行了 `WITH TIES` 修饰符后 +添加 `WITH TIES` 修饰符后 ``` sql SELECT * FROM ( @@ -59,4 +59,8 @@ SELECT * FROM ( └───┘ ``` -cause row number 6 have same value “2” for field `n` as row number 5 +虽然指定了`LIMIT 5`, 但第6行的`n`字段值为2,与第5行相同,因此也作为满足条件的记录返回。 +简而言之,该修饰符可理解为是否增加“并列行”的数据。 + +``` sql, +``` sql