什么是T-SQL等价的MySQL语法LIMIT x,y? [英] What is the T-SQL equivalent of MySQL syntax LIMIT x, y?
问题描述
可能重复:
如何编写(MySQL)LIMIT在SQL Server?
如何使用LIMIT Inside为SQL Server更改查询?
代码:
SELECT apretiz FROM tableApoint WHERE price ='$ newprice'LIMIT 5;
很多东西不工作,所以只是寻求帮助
我怎么改变LIMIT 5,10例子?我不能使用TOP吗?
正如我说的不到一小时前,你必须使用TOP! (LIMIT用于MYSQL)
因此,尝试删除 LIMIT 5
,然后执行 SELECT TOP(5)apretiz
。
此外,尝试添加订单
请在查询之前进行搜索。 链接到旧问题
Possible Duplicate:
How to write a (MySQL) “LIMIT” in SQL Server?
How can I change my query with LIMIT Inside for a SQL-Server ?
Code:
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 ?
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
这篇关于什么是T-SQL等价的MySQL语法LIMIT x,y?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!