Choose three.
Which three statements are true about a self join?
A) It must be an inner join.
B) It can be an outer join.
C) The ON clause must be used.
D) It must be an equijoin.
E) The query must use twodifferent aliases for the table.
F) The ON clause can be used.
Answer::BCD
(解析:左连接其实就是左外连接,是不同的称呼而已,其结果都是一样的,ANSI 语法有左连接的语法,而 oracle 语法中用(+)来表示。)
select emp.empno,emp.deptno,dept.deptno,dept.dname
from emp left join dept on emp.deptno=dept.deptno;
select emp.empno,emp.deptno,dept.deptno,dept.dname
from emp left outer join dept on emp.deptno=dept.deptno;
select emp.empno,emp.deptno,dept.deptno,dept.dname
from emp ,dept
where emp.deptno=dept.deptno(+)
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。