【2019年8月版本】OCP 071认证考试最新版本的考试原题-第11题

Choose two.

Which two statements are true about a self join?

A) The join key column must have an index.

B) It can be a left outer join.

C) It must be a full outer join.

D) It can be an inner join.

E) It must be an equie join.

Answer:BD

(自连接其实跟两张表的连接一样。可以是等连接、左右外连接等等。

不过在进行内连接时为了区别表的名字,需要加别名

select w.ename,m.ename

from emp2 w

inner join emp2 m

on w.mgr=m.empno;

)

上一篇:多表连接查询


下一篇:Pycharm报错:IndentationError: unindent does not match any outer indentation level