0
table = emp
SAL
------
8000
7000
6000
5000
10000
9000
4000
8000
7000
对于上面的表,写一条SELECT语句来显示最大和最大的Sals。你的输出应该如下: -我怎样才能得到以下输出?
first second
------- --------
10000 9000
我写了下面的查询,但我得到以下的输出:
select sal from (select rownum first, sal from(select distinct sal from emp1 order by sal desc))where first <= 2;
输出:
SAL
-----
10000
9000
欢迎...击中CTRL-K后,选择你的代码来正确缩进它。 – Benoit 2010-11-23 12:36:36
@Benoit --- thanx – bunty 2010-11-23 12:39:40