In this lesson we are going to study about Natural Join in a database.
Natural Join:
so we can join this two table using
NATURAL JOIN.
SQL :
Note:
Related Article
Natural Join:
- This join is having a special features ,with the use of this join no need to specify the join condition explicitly.
- This type of join offer a further specification of equi join .
- We have to specify the keyword Natural join in the join statement.
- Natural Join automatically joins two table based on columns in the two table which have same datatype and names.
so we can join this two table using
NATURAL JOIN.
SQL :
SELECT *
FROM employee
NATURAL JOIN department;
Note:
- If we write a where clause of a select statement with two or more table then the order parser will start the join operation from right to left.In this case the table name which is written last will be processed,
- The join can happen only on columns having the same names and same data types in both the table .If the columns have the same name ,but different data types,then the NATURAL JOIN syntex causes an error.
Related Article
- Join
- Cross Join
- Equi Join
- Non Equi Join
- Self Join
- Join with Using clause.
- Join with ON clause
- Outer Join.
No comments:
Post a Comment