How to select Second Last Row in mySql?
<p>I want to retrieve the 2nd last row result and I have seen this question: </p>

<p><a href="https://stackoverflow.com/questions/31716524/how-can-i-retrieve-second-last-row">How can I retrieve second last row?</a></p>

<p>but it uses order by which in my case does not work because the Emp_Number Column contains number of rows and date time stamp that mixes data if I use order by .  </p>

<p><a href="https://i.stack.imgur.com/psAf6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/psAf6.png" alt="Table View"></a> </p>

<p>The rows 22 and 23 contain the total number of rows <strong>(excluding row 21 and 22)</strong> and the time and day it got entered respectively.</p>

<p>I used this query which returns the required result 21 but <strong>if this number increases it will cause an error</strong>.</p>

<pre><code>SELECT TOP 1 * 
FROM(
    SELECT TOP 2 * 
    FROM DAT_History
    ORDER BY Emp_Number ASC 
    ) t                     
ORDER BY Emp_Number desc
</code></pre>

<p>Is there any way to get the 2nd last row value without using the Order By function?</p>