Is it possible to execute a select query where the id column is within the last 50 rows?
So like WHERE id > total id – 50.
Something like that?
Not sure of the syntax!
Cheers
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the above if you just want the last 50 items, and it’s probably the cleanest and best way. But if you really care about the ID for some reason, you can use the MAX function:
This of course isn’t terribly efficient and is somewhat unweidly, but will do exactly what you were asking about.