title: Selecting the second row of a table using rownum
body: <p>I have tried the below query:</p>
  
  <pre><code>select empno from (
                     select empno 
                       from emp
                      order by sal desc
                    )
  where rownum = 2
  </code></pre>
  
  <p>This is not returning any records.</p>
  
  <p>When I tried this query </p>
  
  <pre><code> select rownum,empno from (
                          select empno from emp order by sal desc) 
  </code></pre>
  
  <p>It gives me this output:</p>
  
  <pre><code>ROWNUM  EMPNO      
  1       7802        
  2       7809    
  3       7813    
  4       7823
  </code></pre>
  
  <p>Can anyone tell me what's the problem with my first query? Why is it not returning any records when I add the ROWNUM filter?</p>