I am working with a mysql DB called company with Tables:
Employee-> |id_emp|fName|lName|id_Dept|
Department-> |id_Dept|dName|
Project-> |id_Proj|pName|id_Dept|status|budget|actBudget|
Emp_Prof-> |id_Emp|id_Proj|
I am not sure how to run queries that work with the emp_proj join table.
To list all of the employees working on a particular project, I could use this query:
SELECT id_Emp
FROM emp_proj
WHERE id_Emp IS NOT NULL;
However, I'd like to output fName
and lName
from the employee table. I think I need to use a join from Employee
and Emp_Prof
on id_Emp
.
Can anyone help with this type of Query syntax? Thanks...