If a table matches, the FULLJOIN keyword returns rows. FULLJOIN keyword syntax SELECTcolumn_name (s) FROMtable_name1FULLJOINtable_name2ONtable_name1.column_nametable_name2.column_name note: in some cases, FULLJOIN is called FULLOU. If a table matches, the full join keyword returns a row.
Full join keyword syntax
SELECT column_name (s)
FROM table_name1
Full join table_name2
ON table_name1.column_name = table_name2.column_name
Note: In some cases, full join is called full outer join.
Postgres = #
Postgres = # create table t1 (
Postgres (# num int,
Postgres (# name varchar (10)
Postgres (#);
CREATE TABLE
Postgres = #
S = # insert into t1 values (1, 'A ');
INSERT 0 1
S = # insert into t1 values (2, 'B ');
INSERT 0 1
S = # insert into t1 values (3, 'C ');
INSERT 0 1
Postgres = #
Postgres = # create table t2 (
Postgres (# num int,
Postgres (# name varchar (10)
Postgres (#);
CREATE TABLE
Postgres = #
S = # insert into t2 values (1, 'xxx ');
INSERT 0 1
S = # insert into t2 values (3, 'yyy ');
INSERT 0 1
S = # insert into t2 values (5, 'zzz ');
INSERT 0 1
Postgres = #
S = # SELECT * FROM t1 full join t2 ON t1.num = t2.num;
Num | name | num | name
----- + ------ + ----- + ------
1 | a | 1 | xxx
2 | B |
3 | c | 3 | yyy
| 5 | zzz