Comparison between mysql left join and oracle (+)

Source: Internet
Author: User
Comparison between left-side mysql connections and oracle (+). Because mysql cannot use (+) external connections like oracle, use leftjoin or rightjoin. Pay attention to oracle: selecta. aidaid, B. bidbid, c. cidcid, d. diddid, e. eideidfromtableaa, tablebb, tablecc, tabledd, tableeewhe

Comparison between mysql left join and oracle (+) because mysql cannot use (+) External join like oracle, use left join or right join. Pay attention to oracle: select. aid, B. bid, c. cid, d. did, e. eid from tablea a, tableb B, tablec c, tabled d, tablee e whe

Comparison between mysql left join and oracle (+)
Since mysql cannot use (+) for external connections like oracle, You need to note the use of left join or 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 wherea.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.aidorder by a.aid , b.bid , c.cid , d.did ,e.eid;

Lead to http://www.itpub.net/thread-1122562-1-1.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.