db2,oracle,mysql ,sqlserver限制返回的行数

①db2

select * from table fetch first 10 rows only;

②oracle

select * from table where rownum<=10;

③mysql

select * from table limit 10;

④sqlServer

select top 10 * from table;

猜你喜欢

转载自www.cnblogs.com/baxianhua/p/9105372.html