Sqlserver关联查询分页

2020-09-22  本文已影响0人  慵懒的阳光丶
SELECT TOP
        (#{pages})  *
        FROM
        (
        SELECT ROW_NUMBER() OVER (ORDER BY
        b.intermediary_Id)
        AS RowNumber,* FROM
        (select * from user_inter_store uis inner join user_intermediary  ui on uis.intermediary_Id = ui.intermediaryId  where uis.isEnable1=1)
     as b
        ) as a
        WHERE (a.RowNumber >
        (#{pages}-1)*#{limit} )
   
上一篇下一篇

猜你喜欢

热点阅读