SyntaxFix
Write A Post
Hire A Developer
Questions
because it is autoincrement, here's my take:
Select * from tbl where certainconditionshere and autoincfield >= (select max(autoincfield) from tbl) - $n