Professional Documents
Culture Documents
Joining
Joining
1 Eng
2 Doctor
3 Teacher
4 Lawyer
Emp_id Dept_name
1 Eng
2 Eng
3 Eng
4 Eng
1 Doctor
2 Doctor
3 Doctor
4 Doctor
1 Teacher
2 Teacher
3 Teacher
4 Teacher
1 Lawyer
2 Lawyer
3 Lawyer
4 Lawyer
EQUI JOIN : the join in which columns are compared for equlity is
called EQUI-JOIN. In equi join, we use(*) in the select list so that
common column will appears twice in the output.
PARENT
Id Name City
1 A Pune
2 B Goa
3 C Delhi
CHILD
ID Child_name City
1 Chintu Delhi
2 Sonu Goa
3 Monu pune
output :
Name
B
output :
In natural join, when both the table have some column name and
that column is being fetched in the query then the condition of
ambiguity arises that from which table that column is to be fetched.
STUDENT
Roll_no Name
1 Shri
2 Raju
3 Pooja
MARKS
Roll_no Marks
2 70
3 60
4 80
output :
Name
Raju
Pooja