How are you?
Would you please explain how the following queries work
select * from emp where rowid in (select decode(mod(rownum,2),0,rowid, null) from emp);
//3rd max salary
select distinct sal from emp e1 where 3 = (select count(distinct sal) from emp e2 where e1.sal <= e2.sal);
select * from emp where rownum <= &n;
select * from emp minus select * from emp where rownum <= (select count(*) - &n from emp);
2 Months Ago
Related Article:Multiple Nesting SQL Queries ?
is a Databases discussion thread by sobias that has 4 replies, was last updated 2 months ago and has been tagged with the keywords: sql.