Let's start by looking at the results of the left join and the right join and the Inner join and the full join working on the table.
-
- Left JOIN the select * from the EMP left join SAL on EMP. ename = SAL. ename;
Left JOIN, the table EMP is the primary table, so the query results show all the information of the EMP (primary table) and the SAL (schedule) information related to EMP.
- Right-connect the Select * from emp to ' join SAL on EMP '. ename = SAL. ename;
Right connection, table Sal is the primary table, so the query results show all the information of the salt (the primary table) and the EMP (schedule) and the information that Sal wants to close.
-
- Internal Connection SELECT * from EMP inner join SAL on EMP. ename = SAL. ename;
Link, which displays information related to a table.
- Fully connected SELECT * from EMP full join SAL on EMP. ename = SAL. ename;
Fully connected, displaying all two tables of information.
The difference between left join and right join in SQL and Inner join vs. Full join