Language: PL/SQL Highlight Mode: PLSQL Last Modified: March 10th, 2009
CREATETABLE left_tbl (
id NUMBER,
txt VARCHAR2(10));CREATETABLE right_tbl (
id NUMBER,
txt VARCHAR2(10));INSERTINTO left_tbl VALUES(1,'one');INSERTINTO left_tbl VALUES(2,'two');INSERTINTO left_tbl VALUES(3,'three');--insert into left_tbl values (4, 'four' );INSERTINTO left_tbl VALUES(5,'five');INSERTINTO right_tbl VALUES(1,'uno');--insert into right_tbl values (2, 'dos' );INSERTINTO right_tbl VALUES(3,'tres');INSERTINTO right_tbl VALUES(4,'cuatro');INSERTINTO right_tbl VALUES(5,'cinco');-- A full join returns the records of both tables -- (that satisfy a [potential] where condition). In -- the following example, 4 cuatro and 2 two are returned, -- although the ids 4 and 2 are not present in both tables:SELECT
id,
l.txt,
r.txt
FROM
left_tbl l full join
right_tbl r using(id)
id;
ID TXT TXT
---------- ---------- ----------1 one uno
2 two
3 three tres
4 cuatro
5 five cinco
DROPTABLE left_tbl;DROPTABLE right_tbl;
SQL University.net courses meet the most demanding needs of the business world for advanced education
in a cost-effective manner. SQL University.net courses are available immediately for IT professionals
and can be taken without disruption of your workplace schedule or processes.
Compared to traditional travel-based training, SQL University.net saves time and valuable corporate
resources, allowing companies to do more with less. That's our mission, and that's what we deliver.