(select rownum,j.a
from table1 j,table2 t
where j.l1='1111'
and rownum <8
)
minus
(select rownum,j.a
from table1 j,table2 t
where j.l1='1111'
and rownum <7
)
能够得到数据
7XXXX
而
(select j.a
from table1 j,table2 t
where j.l1='1111'
and rownum <8
)
minus
(select j.a
from table1 j,table2 t
where j.l1='1111'
and rownum <7
)
无法得到数据,请问是什么原因,还有我想得到
select j.a
from table1 j,table2 t
where j.l1='1111'
返回的最后一条数据,或某条ROWNUM固定的值,该怎样取得,
前提是不能是select * from(select rownum nu,j.a
from table1 j,table2 t
where j.l1='1111'
and rownum <7) where nu=7
因为其他语句限制,不能再嵌套了,请大家帮忙啊!
|