Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions develop/dev-guide-paginate-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,14 +309,30 @@ ORDER BY page_num;
假如想要删除第 1 页上的所有评分记录,可以将上表第 1 页所对应的 `start_key` 和 `end_key` 填入 SQL 语句当中。

```sql
SELECT * FROM ratings
WHERE
(book_id > 268996 AND book_id < 140982742)
OR (
book_id = 268996 AND user_id >= 92104804
SELECT *
Comment thread
yiduoyunQ marked this conversation as resolved.
FROM ratings
WHERE (
268996 = 140982742
Comment thread
yiduoyunQ marked this conversation as resolved.
AND book_id = 268996
AND user_id >= 92104804
AND user_id <= 374645100
)
OR (
book_id = 140982742 AND user_id <= 374645100
268996 != 140982742
Comment thread
yiduoyunQ marked this conversation as resolved.
AND (
Comment thread
hfxsd marked this conversation as resolved.
(
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;
```