各数据库取前十条数据的方法

2014-11-24 13:33:15 · 作者: · 浏览: 0
数据库取前十条数据的方法
db2: www.2cto.com
select * from tab fetch first 10 rows only
oracle:
select * from tab where rownum <=10
sqlserver:
select top 10 * from tab
select * from tab limit 10