1, internal connection (equivalent connection)
Example: Connecting a table content to a display
Select * from where = E.deptno;
Note: The content is displayed only if the D.deptno = E.deptno condition is met, otherwise it is not displayed
2, external connection: Let the equivalent judgment left and right side of the data can be all displayed, using the external connection mode when using "(+)"
Format:
Left outer join: field = field (+)
right outer join: Field (+) = Field
Example: Display the employee's name, position, and leader name
Analysis:
Confirm the data you want to use:
1, the name of the employee of the EMP table, the position (alias is E)
2, the name of the leader of the EMP table (alias m)
Confirm the connected relationship:
E.mgr = M.empno;
If an employee does not have a lead, the content will not be displayed, it is necessary to use an external connection, so that one side of the table in the absence of leadership, can also be displayed.
Left and right outer joins can be indistinguishable, but the most important thing is to display the contents of the display.
Select E.ename, E.job, M.ename from where= m.empno (+);
Oracle Database Basic Learning (vi) subqueries