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)
 Require SQl Query 4

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-12-21 : 18:28:42
ashish writes "I want to single line SQL query for :

SELECTING FIRST or LAST 5 LINES OF TABLE"

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-12-21 : 18:37:35
You can use TOP with ORDER BY to achieve this. This should be in your class materials.

Tara Kizer
aka tduggan
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-12-21 : 18:45:05
hint: the ORDER BY clause is important..



-ec
Go to Top of Page
   

- Advertisement -