select * from ( select ROW_NUMBER() over(order by ue.wzId desc)row,* from (select e.title, e.childType as childType,e.content as content,e.rsTime as rsTime,e.id as wzId,u.id as usId,u.face as face,u.nickName as nickName from Essay e join Users u on e.userId=u.id)ue ) t where row between 1 and 7
出处:https://www.cnblogs.com/ldli/p/14103593.html