Can any one please let me know, that, i need to fetch last 4 rows from a result-set using mysql. The result-set returns totally 6 records.
but, i need the records to be fetch from last4…i.e,
Record-3
Record-4
Record-5
Record-6
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.
To get the last x number of rows, but have them returned in ascending order, use:
The answer requires that you create a derived table (AKA inline view) based on the rows you want. Then the outer query re-orders the values for presentation.