April 10, 2003 at 3:03 am
Can anybody help
Can i use SELECT statement to
For example,
Last 100 records or
last 10% record
Thanks
April 10, 2003 at 3:12 am
There is no bottom command, only top. So, to get the bottom records, you have to sort desc.
For example:
Select Top 100 *
From myTable
Order By someField DESC
April 10, 2003 at 3:31 am
then i need to add identity field for sorting already. any others ways
Thanks
April 10, 2003 at 3:35 am
an identity field seems to be always a good choice (at least as primary key).
do you want to select the last 10% records added to the table. maybe you have a datetime field when the records has been added?
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply