官术网_书友最值得收藏!

Using the LIMIT clause

The LIMIT clause is used to retrieve a number of rows from a larger data set. It helps fetch the top n records. The LIMIT and OFFSET clauses allow you to retrieve just a portion of the rows that are generated by the rest of the query from a result set:

SELECT select_list FROM table_expression [LIMIT { number | ALL }] [OFFSET number] 

If a limit count is given, no more than that many rows will be returned (but possibly fewer, if the query itself yields fewer rows). LIMIT ALL is the same as omitting the LIMIT clause.

The OFFSET clause suggests skipping many rows before beginning to return rows. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then the OFFSET rows will be skipped before starting to count the LIMIT rows that are returned.

主站蜘蛛池模板: 将乐县| 普定县| 正镶白旗| 本溪| 墨脱县| 昭苏县| 蒲江县| 内乡县| 保定市| 阳江市| 郎溪县| 定安县| 抚州市| 九龙县| 屏山县| 哈尔滨市| 绥德县| 吉木乃县| 灵璧县| 钟山县| 饶阳县| 南陵县| 沾化县| 桂平市| 台东县| 大宁县| 西丰县| 青阳县| 乐业县| 即墨市| 平武县| 彭山县| 福鼎市| 原平市| 顺义区| 巧家县| 和平县| 武穴市| 福鼎市| 肥乡县| 乌兰浩特市|