SQL NATURAL JOIN
SQL NATURAL JOIN is a same as EQUI JOIN but different is resulting contains allow only one column for each pair of same columns named. Record set contains haven't same name columns are found.
Example Table
Considering following SQL NATURAL JOIN example, category
, product
is our example table.
|
|
SQL Natural join query use NATURAL JOIN keyword to specify table name.
Example
SQL> SELECT *
FROM product NATURAL JOIN category;
CATEGORY_ID PRODUCT_NAME CATEGORY_ID CATEGORY_NAME
----------- ------------------ ----------- -------------------
1 Nokia 1 Mobiles
1 Samsung 1 Mobiles
2 HP 2 Laptops
2 Dell 2 Laptops
3 Apple 3 Tablet
4 Nikon 4 Cameras
6 rows selected.