title: find second max in a table using mysql query
body: <p>I have a database with one table called "user" having two fields:</p>
  
  <pre><code>"id" (type: INTEGER, PRIMARY KEY) 
  "name" (type: VARCHAR(32))
  </code></pre>
  
  <p>I want to Write a standard SQL query which retrieves the second highest value of "id" from the "user" table. The value returned should be represented using the column name "id".</p>
  
  <p>I have tried this but it gives me all ids:</p>
  
  <pre><code>SELECT `user`.`id`
  FROM `user`
  ORDER BY `user`.`id` ASC
  LIMIT 0 , 30
  </code></pre>
  
  <p>some example data in my table:</p>
  
  <pre><code>id      name
  ----------------
  1       john
  2       david
  3       mike
  </code></pre>
  
  <p>I want to get '2' but now i'm getting :</p>
  
  <pre><code>id
  ----
  1
  2
  3
  </code></pre>
  
  <p>I can do it with help of PHP but I want to know the way with mysql (SQL).
  thanks</p>