Oracle提供了一个非常好用的关键字rownum,可以限制结果集的大小。
MySQL也提供了相同的功能,写法略有差别。

Usage:
Select clause
[LIMIT [offset,] rows]

In Oracle
select * from table1 where rownum <= 2;

In MySQL
select * from table1 limit 0,2;
or
select * from table1 limit 2;

相关文章:

  • 2022-02-10
  • 2021-11-20
  • 2021-08-26
  • 2022-12-23
  • 2021-08-09
  • 2022-02-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案