Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

Hive Join


Let’s see two tables Employee and EmployeeDepartment that are going to be joined.

Employee_Department_table

Inner joins

  1. Select  *  from employee join employeedepartment  ON (employee.empid=employeedepartment.empId)

Output : <<InnerJoin.png>>

Left outer joins

  1. Select e.empId, empName, department from employee e Left outer join employeedepartment ed on(e.empId=ed.empId);

Output : <<LeftOuterJoin.png>>

Right outer joins

  1. Select e.empId, empName, department from employee e Right outer join employeedepartment ed on(e.empId=ed.empId);

Full outer joins

  1. Select e.empId, empName, department from employee e FULL outer join employeedepartment ed

Comments

comments