title: How can I select the record with the 2nd highest salary in database Oracle?
body: <p>Suppose I have a table employee with id, user_name, salary. How can I select the record with the 2nd highest salary in Oracle?</p>
  
  <p>I googled it, find this solution, is the following right?:</p>
  
  <pre><code>select sal from
       (select rownum n,a.* from
          ( select distinct sal from emp order by sal desc) a)
  where n = 2;
  </code></pre>