sqlserver row_number 类似 mysql中 limit 用法

select * from (
select row_number() over(ORDER BY inspecdate desc,inspectime DESC,itemorder asc ) as num,
contentid,quesioncontext,tempid,tempname,itemid,itemtext,belongteam,teamname,inspecdate,
inspectime,contenttext,createperson,newaddtime,updatetime,operater,itemorder
FROM tb_inspecreports_content
) U
where 1=1 and U.tempid='ae1a3e7b-5307-4b97-a8c4-1dbbaf5a9b36' ORDER BY
U.inspecdate desc,U.inspectime DESC,U.itemorder asc

 

 

posted on 2014-08-01 16:13  小东北  阅读(4406)  评论(0编辑  收藏  举报