当前位置:网站首页>limit 与offset的用法(转载)
limit 与offset的用法(转载)
2022-07-07 21:54:00 【流楚丶格念】
limit 与offset的用法
在mysql中一般使用limit来实现分页
1、LIMIT后面跟一个参数,表示要提取的数量。
如 :select* from test LIMIT 3 指提取前三条数据,类似sqlServer的top语法。
2、LIMIT后面跟两个参数时,第一个参数是指第几行,第二个参数是取几条数据。
如: select * from test limit 2,3; 这个SQL是指从第二行的下一行开始向下取3条数据。(即取:3,4,5行的三条数据)
3、LIMIT和OFFSET组合使用时,LIMIT后面只能有一个参数,表示要提取的数量,offset后面的数字则表示第几行。
如:select * from test LIMIT 3 offset 2; 这个SQL是指从第二行的下一行开始向下取3条数据。(即取:3,4,5行的三条数据)
边栏推荐
- C method question 1
- C - linear table
- 激光slam学习(2D/3D、偏实践)
- Chisel tutorial - 05 Sequential logic in chisel (including explicit multi clock, explicit synchronous reset and explicit asynchronous reset)
- Chisel tutorial - 00 Ex.scala metals plug-in (vs Code), SBT and coursier exchange endogenous
- SAP memory parameter tuning process
- FFA与ICGA造影
- Benchmarking Detection Transfer Learning with Vision Transformers(2021-11)
- 串联二极管,提高耐压
- 【leetcode】day1
猜你喜欢
![Arbre binaire équilibré [Arbre AVL] - Insérer et supprimer](/img/1f/cd38b7c6f00f2b3e85d4560181a9d2.png)
Arbre binaire équilibré [Arbre AVL] - Insérer et supprimer

Uic564-2 Appendix 4 - flame retardant fire test: flame diffusion

BSS 7230 flame retardant performance test of aviation interior materials

The file format and extension of XLS do not match

Chisel tutorial - 05 Sequential logic in chisel (including explicit multi clock, explicit synchronous reset and explicit asynchronous reset)

SAP HR labor contract information 0016

一鍵免費翻譯300多頁的pdf文檔

激光slam学习(2D/3D、偏实践)

C # exchange number, judge to pass the exam

An example analysis of MP4 file format parsing
随机推荐
@Configuration注解的详细介绍
数据库面试题+解析
Laser slam learning (2d/3d, partial practice)
35岁那年,我做了一个面临失业的决定
Rectification characteristics of fast recovery diode
Benchmarking Detection Transfer Learning with Vision Transformers(2021-11)
Rock-paper-scissors
[path planning] use the vertical distance limit method and Bessel to optimize the path of a star
Pycharm basic settings latest version 2022
ASP. Net core middleware request processing pipeline
AITM3.0005 烟雾毒性测试
HB 5469 combustion test method for non-metallic materials in civil aircraft cabin
Possible SQL for Oracle table lookup information
Wechat applet development beginner 1
Slam interview summary
【7.5】15. Sum of three numbers
C # exchange number, judge to pass the exam
Dependency injection
Chisel tutorial - 01 Introduction to Scala
Installing gradle