Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 How do you get the BOTTOM 25 rows of info - or how to jump to the end of a table?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-02-18 : 23:46:01
Cynthia writes "Hello - thanks for the info on TOP - but what about getting the bottom 25 rows of data ? or just jump to the end of a table? Thanks."

LarsG
Constraint Violating Yak Guru

284 Posts

Posted - 2003-02-19 : 08:08:54
There are no top or bottom of tables. TOP is only applicable if you have an ordered result so you need to sort the result in reverse order.

select top 20 from t order by c desc

get the 20 rows with the HIGHEST value in c.

Go to Top of Page
   

- Advertisement -