java基础之面试篇六-oracle,mysql,sqlserver,db2取前十条记录sql语句
程序员文章站
2022-03-01 22:09:27
...
1.oracle:
select * from table1 where rownum <= 10;
2.sql server:
select top 10 * from table1
3.mysql:
select * from table1 limit 10
4.db2:
select * from table1 fetch first 10 rows only
select * from table1 where rownum <= 10;
2.sql server:
select top 10 * from table1
3.mysql:
select * from table1 limit 10
4.db2:
select * from table1 fetch first 10 rows only