title: How to get second last row from a mysql database?
body: <p>I just made a query to get second last row from database:</p>
  <p>Here Is code:</p>
  <pre><code>SELECT TOP 1 * FROM
     (select Top 2 * from Categories ORDER BY CategoryID DESC)x                     
     ORDER BY CategoryID
  </code></pre>
  <p>but this code gives me error syntax error in new version.</p>
  <p>In older version this code work fine.</p>
  <p>What is problem: I have 10 results in the table, and when I submit this query, it gives me 9 row. But when 9 row delete from table, now I have 8 and 10. But this code gives me 10.</p>