PostgreSQL LIMIT

grammar

SELECT select_list 
FROM table_name
ORDER BY sort_expression
LIMIT row_count

row_countIf the value is 0, no statement will be returned. If the value is other numbers, the corresponding number of statements will be returned. If the value is NULL, the LIMIT statement will be invalid.

Skip the specified line and then LIMIT syntax

SELECT select_list
FROM table_name
LIMIT row_count OFFSET row_to_skip;

If row_to_skip is 0, the OFFSET statement is invalid.
Note that the index of OFFSET starts from 0.

Guess you like

Origin blog.csdn.net/weixin_42072754/article/details/109635687