17,377
社区成员
发帖
与我相关
我的任务
分享
select emp.*,dept.* from emp,dept,
(
select newrowid
from (select res.*, rownum rownum_
from (select t.rowid newrowid from emp t) res
where rownum <= 6)
where rownum_ >= 4
) tt
where emp.rowid = tt.newrowid
and emp.deptno = dept.deptno
select emp.*,dept.* from emp,dept,
(
select rowid1,rowid2 from (select res.*, rownum rownum_
from (select emp.rowid rowid1,dept.rowid rowid2 from emp,dept where emp.deptno = dept.deptno) res
where rownum <= 6)
where rownum_ >= 4
) tt
where emp.rowid = tt.rowid1
and dept.rowid = tt.rowid2
and emp.deptno = dept.deptno