Monday, February 20, 2012

Is there an equivalent syntax to TOP IN SQL?

Hi everyone, I am new to SQL, and would really appreciate help with this.

I have a database with the following fields:
IDNumber: sequential running from 1 to approx 50000
SURNAME: Surname
FNAME: Forename.

I want to return the last 100 IDNUmbers and return the surname and fname associated with the IDNumbers.
When I try TOP it gives me IDNumbers 1 to 100, is there an equilvant for the bottom 100 numbers.
Please help if you can.
Thanks
ScottReturn the top 100, but just order by IDNumbers DESC|||Thank you so much, I would never have worked that out.
And DESC stands for descending !? Fab!
Thanks again, I owe you a beer.

Scott

No comments:

Post a Comment