PDA

View Full Version : SQL equivalent for MySQL "LIMIT"?...


ShootingBlanks
07-25-2008, 09:04 PM
Hello.

I know that if I wanted, say, records 6-10 of a query in MySQL I'd just tack on "LIMIT 5,5" to the end of my query. But what about in SQL? Is that possible?...

I know to get the first, say, 15 records you'd say "SELECT TOP(15)" but I don't know how to select a certain number of records starting from in the middle of the recordset...

Thanks!...

Fumigator
07-27-2008, 07:19 AM
Which relational database management system are you referring to? "SQL" is the general term used to describe the syntax most RDBMSs use.

ShootingBlanks
07-28-2008, 03:07 PM
I actually just found a solution here, in case anyone's interested. It worked great for me:

http://www.tech-recipes.com/rx/1868/mimic_the_mysql_limit_feature_in_microsoft_sql_server