SQL Server will allow you to limit a SELECT to the first n rows, but not (to my knowledge) to skip a number of rows before returning the desired rows. The mechanism used is SET ROWCOUNT (6.5 and 7.0) or TOP (7.0). The difference is that SET ROWCOUNT limits the output rows before applying an ORDER BY sort. TOP applies the ORDER BY before limiting output. --Greg Johnson -----Original Message----- From: Toby Miller [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 10:31 AM To: [EMAIL PROTECTED] Subject: LIMIT Hey all, I've been using the LIMIT feature for paginating in MySQL for a long time now. It's really nice and makes paginating extremely simple. Up until now I've been using a dictionary object to get the same effect out of Microsoft SQL Server. Do any of you know a LIMIT equivalent for SQL Server? I would much rather grab the number of records I need rather than grabbing a reference to all of the records and only displaying the ones that I need. It seems redundant and I really hate the fact that LIMIT is not supported. Any ideas? By the way, suggestions for SQL Server 6.5 or SQL Server 7.0 are both appreciated. Thanks, Toby --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php