mysql左連接與oracle(+)使用對(duì)比 由于mysql不能像oracle一樣使用(+)做外連接,使用left join或者right join需要注意 oracle: select a.aid aid , b.bid bid ,c.cid cid , d.did did , e.eid eid from tablea a , tableb b ,tablec c ,tabled d ,tablee e whe
mysql左連接與oracle(+)使用對(duì)比oracle: select a.aid aid , b.bid bid ,c.cid cid , d.did did , e.eid eid from tablea a , tableb b , tablec c , tabled d , tablee e where a.aid = b.aid (+) and a.aid = c.aid(+) and b.bid = d.bid (+) and d.did = e.eid (+) order by a.aid , b.bid , c.cid , d.did ,e.eid ; mysql: select a.aid aid , b.bid bid ,c.cid cid , d.did did , e.eid eid from tablea a left join ( tableb b left join ( tabled d left join tablee e on (d.did = e.eid) ) on (b.bid = d.bid ) ) on ( a.aid = b.aid) left join tablec c on a.aid = c.aid order by a.aid , b.bid , c.cid , d.did ,e.eid ;
聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com