You are on page 1of 7

Inner Join

Dept ID Dept Name EmpId EmpName DeptID


1 IT 1 Peter 4
2 Sales 2 Sam 5
3 Finance 3 James 4
4 Marketing 4 Mark 2
5 HR 5 Miller 3

DeptID Dept Name EmpID empname


2 Sales 4 Mark
3 Finance 5 Miller
4 Marketing 1 Peter
4 Marketing 3 James
5 HR 2 Sam

Left Join

EmpId EmpNamDeptID Dept I Dept Name


1 Peter 4 1 IT
2 Sam 5 2 Sales
3 James 4 3 Finance
4 Mark 2 4 Marketing
5 Miller 3 5 HR
6 Shawn null

EmpId EmpNamDeptID Dept Name


1 Peter 4 Marketing
2 Sam 5 HR
3 James 4 Marketing
4 Mark 2 Sales
5 Miller 3 Finance
6 Shawn null Null

Right Join

EmpId EmpNamDeptID Dept I Dept Name


1 Peter 4 1 IT
2 Sam 5 2 Sales
3 James 4 3 Finance
4 Mark 2 4 Marketing
5 Miller 3 5 HR
6 Shawn null
Dept ID Dept Name EmpId EmpName
1 IT Null Nulll
2 Sales 4 Mark
3 Finance 5 Miller
4 Marketing 1 Peter
4 Marketing 3 James
5 HR 2 Sam

Full JOin

EmpId EmpNamDeptID Dept I Dept Name


1 Peter 4 1 IT
2 Sam 5 2 Sales
3 James 4 3 Finance
4 Mark 2 4 Marketing
5 Miller 3 5 HR
6 Shawn null

EmpId EmpNamDeptID Dept Name


1 Peter 4 Marketing
2 Sam 5 HR
3 James 4 Marketing
4 Mark 2 Sales
5 Miller 3 Finance
6 Shawn null Null
Null Null Null IT

Merge Source Table

Source Products
Product ProductName Price Product
1 Table 100 1
2 Desk 80 2
3 Chair 50 5
4 Computer 3000 6

Product ProductName
1 Table
2 Desk
5 Bed
6 Cupboard
3 Chair
4 Computer
destination table

Target Products
ProductName Price
Table 100 ProductID
Desk 80 1
Bed 50 2
Cupboard 300 3
4

Price
100
80 Update Operation
50 delete operation
300 delete operation
50 Insert operation
3000 Insert operation
ProductNaPrice
Table 100
Desk 80
Chair 50
Computer 300

You might also like