In layman's terms:
The number of connections for a LEFT join B is the same as the number of records in Table A
A RIGHT join B has the same number of records as the number of records in table B
A LEFT join B equivalence B right join A
Table A:
Field_k, field_a
1 A
3 b
4 C
Table B:
Field_k, Field_b
1 x
2 y
4 Z
Select A.field_k, A.field_a, B.field_k, b.field_b
From a LEFT join B on A.field_k=b.field_k
Field_k field_a Field_k field_b
---------- ---------- ---------- ----------
1 a 1 x
3 b NULL NULL
4 C 4 Z
Select A.field_k, A.field_a, B.field_k, b.field_b
From a RIGHT join B on A.field_k=b.field_k
Field_k field_a Field_k field_b
---------- ---------- ---------- ----------
1 a 1 x
Null null 2 y
4 C 4 Z--
As an example:
Suppose the data in table A and table B are like this.
A b
ID Name ID Stock
1 a 1 15
2 B 2 50
3 C
SELECT * from a INNER join B on a.id=b.id
This syntax is the inner join in the connection query, and it produces the result
Two table-matched records appear in the results list.
According to the table above, the result is this
a.ID name b.ID Stock
1 a 1 15
2 B 2 50
----------------------------
SELECT * FROM A,b where a.id=b.id
This syntax is another form of inner join, and its execution is the same as inner join
--------------------------------
SELECT * from a left/right join B on a.id=b.id
This is the left outer join or the right outer join in the outer join syntax
If it is a left outer join, it will show all records in Table A,
Select a.*,b.* from a LEFT join B on a.id=b.id
The result of the query is this:
a.ID name b.ID Stock
1 a 1 15
2 B 2 50
3 c NULL NULL
--------------------------------------------
If it's a right outer join, it will show all the records in table B,
Select a.*,b.* from right join B on a.id=b.id
The result of the query is this:
a.ID name b.ID Stock
1 a 1 15
2 B 2 50
--
Select a.*,b.* from a LEFT join B on a.k = B.K
Select a.*,b.* from a left outer join B on A.K =B.K
----------the top two. Left join is shorthand for left outer join
Select a.*,b.* from a left inner join B on a.k = B.K
There is no such wording, wrong statement.