oracle多表联合查询怎么加分页

2019-05-25 21:37发布

1条回答
juvenok - 这个人很懒,什么都没留下
1楼 · 2019-05-25 22:07.采纳回答

select * from (
select ct.*,rownum rn from (
select SUPP.adm_id id,SUPP.shop_name name,SUPP.img, 1 as pg
from CT_admin_extend SUPP
where SUPP.shop_name like '%锦江之星%'
union all
select PRO.id,PRO.name,PRO.img,2 as pg
from CT_supp_product PRO
where PRO.name like'%锦江之星%'
union all
select HD.id,HD.name,HD.img,3 as pg
from CT_supp_coupon HD
where HD.name like'%锦江之星%'
order by id) ct)
where rn between 1 and 20
你要这个?

一周热门 更多>