July 19, 2017

Inner Join

Will list rows where left and right match

select
emp.id,
emp.name,
dept.name
from employee emp
inner join department dept
on emp.dept_id = dept.dept_id

Will list only those employees who have a department which is found in the dept table.

No comments:

Post a Comment