以显示5行为例:
BD2中,使用fetch first字句
select * from emp fetch first 5 rows only
MySQL和PostgreSQL中,使用Limit
select * from emp limit 5
在Oracle中,在where字句中通过使用ROWNUM来限制行数
select * from emp where rownum<=5
SQL Server中,使用关键字TOP,限制返回的行数
select top 5 * from emp