Reputation: 363
Im trying to run a query that uses a left outer join but i keep getting a syntax error. Im not sure whats causing it.
SELECT employee.emp_num, employee.emp_lname, pilot.pil_license
FROM employee LEFT OUTER JOIN pilot
WHERE employee.emp_num = pilot.emp_num;
Upvotes: 1
Views: 3677
Reputation: 5256
I'm guessing your error is "Incorrect syntax near the keyword 'where'.". It should be rewritten thus:
SELECT employee.emp_num, employee.emp_lname, pilot.pil_license
FROM employee
LEFT OUTER JOIN pilot ON employee.emp_num = pilot.emp_num;
Upvotes: 5