Ans: The SQL JOIN statement is used to combine the data contained in two relational database tables based upon a common attribute.
Basically there are two types of Joins
1. Inner Join
An inner join is a join that selects only those records from both database tables that have matching values. Records with values in the joined field that do not appear in both of the database tables will be excluded from the query. One or more fields can serve as the join fields.
2. Outer Join
Outer Join has 2 types further.
2a. Right Outer Join: 2b. Left Outer Join
An outer join selects all of the records from one database table and only those records in the second table that have matching values in the joined field. In a left outer join, the selected records will include all of the records in the first database table. In a right outer join, the selected records will include all records of the second database table. One or more fields can serve as the join fields.
|