課程
/數(shù)據(jù)庫
/Oracle
/Oracle高級查詢
oracle 能用 left join 和 right join嗎?
2018-02-17
源自:Oracle高級查詢 3-6
正在回答
select d.deptno,d.dname,count(e.empno) from emp e right join dept d on e.deptno=d.deptno group by d.deptno,d.dname;
等同于右外連接;
兩種語句區(qū)別也不大,但是外連接的符號位置不常用估計會記錯。
在沒看今天的視頻之前,我一直使用left/right join;
看到同事(+)?的外鏈接,我都會改為left / right join table_name on ***
可以。
left join? 左表為主表,左表返回全部數(shù)據(jù),右表只返回與左表相匹配的數(shù)據(jù)select l.str as left_str,r.str right_str from l?left join r on l.v=r.vorder by 1,2;
舉報
數(shù)據(jù)庫開發(fā)中應用廣泛的高級查詢,本教程通過大量的案例詳細講解
1 回答為什么沒講join關鍵字
1 回答學習oracle群
2 回答oracle 中null=null 或者像null!=null,null和null之間可以進行判斷嗎,怎么證明
1 回答oracle有沒有內連接
1 回答oracle中有視圖嗎 怎么沒有看到視圖的講解
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2019-01-04
select d.deptno,d.dname,count(e.empno) from emp e right join dept d on e.deptno=d.deptno group by d.deptno,d.dname;
等同于右外連接;
兩種語句區(qū)別也不大,但是外連接的符號位置不常用估計會記錯。
2018-05-27
在沒看今天的視頻之前,我一直使用left/right join;
看到同事(+)?的外鏈接,我都會改為left / right join table_name on ***
2018-02-20
可以。
left join? 左表為主表,左表返回全部數(shù)據(jù),右表只返回與左表相匹配的數(shù)據(jù)
select l.str as left_str,r.str right_str from l?
left join r on l.v=r.v
order by 1,2;