美文网首页
Sqlserver关联查询分页

Sqlserver关联查询分页

作者: 慵懒的阳光丶 | 来源:发表于2020-09-22 16:14 被阅读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} )
       
    

    相关文章

      网友评论

          本文标题:Sqlserver关联查询分页

          本文链接:https://www.haomeiwen.com/subject/jeiwyktx.html