diff --git a/develop/dev-guide-paginate-results.md b/develop/dev-guide-paginate-results.md index a61805e01575b..cb46b6f8c23c7 100644 --- a/develop/dev-guide-paginate-results.md +++ b/develop/dev-guide-paginate-results.md @@ -306,14 +306,30 @@ The result is as follows: To delete all rating records on page 1, replace the `start_key` and `end_key` with values of page 1 in the above result: ```sql -SELECT * FROM ratings -WHERE - (book_id > 268996 AND book_id < 140982742) - OR ( - book_id = 268996 AND user_id >= 92104804 +SELECT * +FROM ratings +WHERE ( + 268996 = 140982742 + AND book_id = 268996 + AND user_id >= 92104804 + AND user_id <= 374645100 ) OR ( - book_id = 140982742 AND user_id <= 374645100 + 268996 != 140982742 + AND ( + ( + book_id > 268996 + AND book_id < 140982742 + ) + OR ( + book_id = 268996 + AND user_id >= 92104804 + ) + OR ( + book_id = 140982742 + AND user_id <= 374645100 + ) + ) ) ORDER BY book_id, user_id; ``` @@ -330,4 +346,4 @@ Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or Ask the community on [Discord](https://discord.gg/DQZ2dy3cuc?utm_source=doc) or [Slack](https://slack.tidb.io/invite?team=tidb-community&channel=everyone&ref=pingcap-docs), or [submit a support ticket](https://tidb.support.pingcap.com/). - \ No newline at end of file +