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

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.

主站蜘蛛池模板: 建始县| 卢氏县| 深水埗区| 连南| 东乌珠穆沁旗| 涿州市| 南投市| 古田县| 西林县| 乌鲁木齐县| 兴义市| 汪清县| 比如县| 丰镇市| 于都县| 桐梓县| 临安市| 二手房| 开鲁县| 清河县| 镇沅| 名山县| 宜阳县| 亳州市| 江津市| 嵊州市| 西青区| 和田县| 吉林省| 天峨县| 奇台县| 勐海县| 仁怀市| 尉犁县| 五原县| 榆中县| 安西县| 临西县| 万州区| 三穗县| 土默特左旗|