mysql的等效语法是什么? LIMIT" SQL Server中的子句 [英] What is the Equivalent syntax of mysql " LIMIT " clause in SQL Server
本文介绍了mysql的等效语法是什么? LIMIT" SQL Server中的子句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SQL Server中MySQL"LIMIT"子句的等效语法是什么.我想用它来分页我的结果. (想显示记录5到10)
What is the Equivalent syntax of MySQL " LIMIT " clause in SQL Server . I would like to use it for doing paging of my results. (want to show records5 to 10 )
推荐答案
最接近的是TOP:
Select top 5 * from tablename
您可以获得一个范围(第5-10行)
You can get a range ( rows 5 - 10)
SELECT * FROM (
SELECT TOP n * FROM (
SELECT TOP z columns -- (z=n+skip)
FROM tablename
ORDER BY key ASC
)
)
这篇关于mysql的等效语法是什么? LIMIT" SQL Server中的子句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文