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

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.

主站蜘蛛池模板: 宜宾县| 清水县| 余江县| 乌苏市| 军事| 馆陶县| 通许县| 茌平县| 扎兰屯市| 那坡县| 迭部县| 寻甸| 高台县| 当涂县| 荃湾区| 泰和县| 山西省| 中牟县| 甘谷县| 南京市| 旬邑县| 扎鲁特旗| 桃源县| 龙海市| 突泉县| 潢川县| 当阳市| 卫辉市| 抚州市| 桐柏县| 东阿县| 承德县| 湟源县| 临沭县| 太仆寺旗| 凤山市| 鄢陵县| 中西区| 武宣县| 宿迁市| 宜川县|