0

I have one table named employees which contains employees' IDs (which is PK)-stands for managers-and reportsTo(which is FK). I don't know what is the correct condition to find which manager is being reported to by their employees? I've tried this condition but it didn't work

select 
   employeeNumber, 
   lastName, 
   phone, 
   extension 
from employees 
where reportsTo = employeeNumber

I'm new to mysql! Here is my table Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.