1.分頁模板 select * from ( select rownum as rn , a.* from( 某個表名) a) where rn between 0 and 6 2 某個表名 select aa.title,aa.url,bb.times, bb.makedate from menu aa, 3 將2 放入到1 中 select * from ( select rownum as rn , a.* from( select aa.title,aa.url,bb.times, bb.makedate from menu aa,
②另外一個實例
select aa.title,aa.url,bb.times, bb.makedate,cc.title from menu aa,menu cc, (select count(*) times,title , max(id) id,max(makedate) makedate from menulog group by title order by count(*) desc ) bb where aa.id=bb.id and aa.pid =cc.id and aa.title like '%醫(yī)療賬單錄入清單%' select aa.title, aa.url, bb.times, bb.makedate, cc.title from menu aa, menu cc, (select count(*) times, title, max(id) id, max(makedate) makedate from menulog group by title order by count(*) desc) bb where aa.id = bb.id and aa.pid = cc.id and aa.title like '%醫(yī)療賬單錄入清單%'
select * from (select rownum as rn, a.* from (select aa.title, aa.url, bb.times, bb.makedate, bb.maketime, (select title from menu kk where kk.id = aa.pid) menulevelfouth from menu aa, (select count(*) times, title, max(id) id, max(makedate) makedate, max(maketime) maketime from menulog group by title order by count(*) desc) bb where aa.id = bb.id) a) where rn between 0 and 4
|
|