您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

mysql左连接与oracle(+)使用对照

2024/3/11 0:32:46发布21次查看
mysql左连接与oracle(+)使用对比 由于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(+)使用对比
由于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 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;
引至http://www.itpub.net/thread-1122562-1-1.html
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product