1. Finds the two highest salaries from table "emp".
select a.empno,a.sal @b@from emp a@b@where 2>@b@(@b@select count(*) @b@from emp @b@where sal>a.sal@b@);
2. Finds the two lowest salaries from table "emp".
select a.empno,a.sal @b@from emp a@b@where 2>@b@(@b@select @b@count(*)@b@from emp@b@where sal<a.sal@b@)
另外
select [column_list],ROWNUM@b@ from (@b@ select [column_list]@b@ from table_name ORDER BY top-n_column ) @b@ where ROWNUM <= N;