3
SQL Joins Types and Syntax Mudasir Qazi - [email protected] 11-Dec-14 1

Database - SQL Joins

Embed Size (px)

Citation preview

Page 1: Database - SQL Joins

Mudasir Qazi - [email protected] 1

SQL JoinsTypes and Syntax

11-Dec-14

Page 2: Database - SQL Joins

Mudasir Qazi - [email protected] 2

Note:

• You can apply join without using ‘join’ keyword, that is called “Natural Join” and it is equivalent to the “Inner join”.• For example we have two tables under name Employee and Project

then we can apply natural join like this on employee_id.SELECT <select_list>

FROM Employee, ProjectWHERE Employee.employee_id = Project.employee_id;

• There are 8 types of joins in SQL (1 about and 7 are explained in next slide).

11-Dec-14

Page 3: Database - SQL Joins

Mudasir Qazi - [email protected] 311-Dec-14