//从第1条记录开始向后选择2条

语句1:select * from test_tb1 limit 2 offset 1;//MySQL5.0之后支持该语法

语句2:select * from test_tb1 limit 1,2;

语句1和语句2是等价的

//

select * from test_tb1 limit 1;//选择第0行

相当于select * from test_tb1 limit 0,1;

 

 

注意:行号从0开始,limit 1,1 代表第1行(从0行开始)。

相关文章:

  • 2021-11-28
  • 2021-11-18
  • 2021-08-04
  • 2021-11-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-08-13
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案