In Oracle, the left and right join statements in SQL Server are saved, and they are represented by a "(+.
In the following experiment, query 1 and query 2 are equivalent, and query 3 and query 4 are equivalent.
Query 1:
Select first_name, department_name, EMP. department_id from EMP, parameters Dept
Where EMP. department_id (+) = Dept. department_id;
122 rows selected.
Query 2:
Select first_name, department_name, EMP. department_id from orders ments dept left join EMP
On EMP. department_id = Dept. department_id;
122 rows selected.
Query 3:
Select first_name, department_name, EMP. department_id from EMP, parameters Dept
Where EMP. department_id = Dept. department_id (+ );
107 rows selected.
Query 4:
Select first_name, department_name, EMP. department_id from EMP left join partitions Dept
On EMP. department_id = Dept. department_id;
107 rows selected.
Summary:
1. Where is the (+) side, all records on the other side are returned.
2. (+) is placed on one side that contains null values. It cannot be used on both sides at the same time.
The supplementary inline method uses the Using Keyword:
Select first_name, department_name, department_id from EMP join orders ments dept using (department_id );
Note: The fields in using cannot contain aliases, and the fields in using in select_list cannot contain aliases. See the following two examples:
Select first_name, department_name, EMP. department_id from EMP join conditions dept using (EMP. department_id );
Using (EMP. department_id)
*
Error at line 2:
ORA-01748: only simple column names allowed here
Select first_name, department_name, EMP. department_id from EMP join conditions dept using (department_id );
Select first_name, department_name, EMP. department_id from EMP join statements Dept
*
Error at line 1:
ORA-25154: column part of using clause cannot have qualifier
Join using, which is equivalent to inner join
Select EMP. first_name, Dept. department_name, EMP. department_id from EMP join orders ments Dept
On EMP. department_id = Dept. department_id;