There are 3 kinds of joins as;
- Left Join
- Right Join
Let's say we have 2 tables as;
Customer(Cno, Cname, Address);
Order(Tid, description, amount, Cno);
So the query can be written in format as;
Select <<Column names>> from <<Table name1>> <<Join type>> <<Table name2>> ON <<table name.column>> = = <<table name2.column>>
These 3 types of joins can be summarized as,
- Join returns records from both the tables if at-least one condition is matching.
- Left join returns records from the left table even if no condition is matching.
- Right join returns records from the right table even if no condition is matching.