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

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.

主站蜘蛛池模板: 临沭县| 和顺县| 麦盖提县| 祥云县| 南投县| 阳谷县| 贵港市| 隆化县| 东丽区| 休宁县| 建水县| 遂平县| 上蔡县| 奉化市| 嘉义市| 阜平县| 高陵县| 三原县| 凭祥市| 平阴县| 晋城| 湟源县| 马公市| 商丘市| 岱山县| 湄潭县| 娄底市| 东城区| 大冶市| 汉源县| 万宁市| 长宁县| 古丈县| 扎鲁特旗| 黄山市| 合肥市| 洛宁县| 鹤壁市| 阳谷县| 德江县| 石楼县|