SQL Inner Join/ SQL Natural Join:

·

Inner Join = Equi Join = Natural Join is the usually same.

An inner join has an ON clause that specifies the join conditions. Rather than having a huge rowset in memory and filtering the data, this join extracts only the data that meets the join conditions. The keyword INNER is optional because a JOIN clause will be INNER by default. An inner join is called equi-join when all the columns are selected with a *, or natural join otherwise.


inner or natural joins - just a "regular" join.



Employee table:
LND_Id
Kamal31
Jones33
Singh33
Smith34
Robinson34
Jasper36


Department Table:
Department NameD_Id
Sales31
Engineering33
Clerical34
Marketing35


Example inner join (ANSI 92 standard syntax):


SELECT * FROM employee
INNER JOIN department
ON employee.D_id = department.D_id

Example inner join (non-standard syntax):


SELECT * FROM employee, department
WHERE employee.D_id = department.D_id

Inner join result :

LND_IdDepartment NameD_Id
Smith34Clerical34
Jones33Engineering33
Robinson34Clerical34
Singh33Engineering33
Kamal31Sales31

Live Traffic Feed

About this blog

Site Sponsors