pretyBoy pretyBoy - 1 year ago 37
SQL Question

What is the T-SQL equivalent of MySQL syntax LIMIT x, y?

Possible Duplicate:

How to write a (MySQL) “LIMIT” in SQL Server?

How can I change my query with LIMIT Inside for a SQL-Server ?


SELECT apretiz FROM tableApoint WHERE price = '$newprice' LIMIT 5;

Many things are not working so just asking for help

And how can i change LIMIT 5,10 by example ? Can't I use TOP for it ?

Answer Source

As i said it less than one hour ago, you have to use TOP ! (LIMIT is used for MYSQL)

So try to remove LIMIT 5 and do SELECT TOP(5) apretiz.

Also, try to add order by (same reason than before).

Please make a search before asking things. Link to old question