java基础之面试篇六-oracle,mysql,sqlserver,db2取前十条记录sql语句
程序员文章站
2022-03-31 16:24:07
...
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
上一篇: php preg_replace函数基础与实例代码_PHP教程
下一篇: 求教怎么读取无限级分类