Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What would be LIMIT clause equavalent in SQL Server?
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01401871
Message ID:
01401934
Views:
57
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>Just curious for SQL Server 2000 how would you get LIMIT functionality. It's not hard to write for SQL Server 2005 and up.

How about:
SET ROWCOUNT 5
SELECT * FROM YourTable WHERE Something >= 10
SET ROWCOUNT 0
That should returns 5 rows.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform