本文介绍了什么是T-SQL等价的MySQL语法LIMIT x,y?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用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



此外,尝试添加订单

请在查询之前进行搜索。


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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 00:00