how to get last 5 records in sql code example
Example 1: how to get last row of table in sql
mysql> select *from getLastRecord ORDER BY id DESC LIMIT 1;
Example 2: select last row in sql
SELECT TOP 1 * FROM Table ORDER BY ID DESC
mysql> select *from getLastRecord ORDER BY id DESC LIMIT 1;
SELECT TOP 1 * FROM Table ORDER BY ID DESC