Anybody can help me out for leetcode 1965 finding missing information. the question is as below :
Input: Employees table: +-------------+----------+ | employee_id | name | +-------------+----------+ | 2 | Crew | | 4 | Haven | | 5 | Kristian | +-------------+----------+ Salaries table: +-------------+--------+ | employee_id | salary | +-------------+--------+ | 5 | 76071 | | 1 | 22517 | | 4 | 63539 | +-------------+--------+ Output: +-------------+ | employee_id | +-------------+ | 1 | | 2 | +-------------+ Explanation: Employees 1, 2, 4, and 5 are working at this company. The name of employee 1 is missing. The salary of employee 2 is missing.
My solution is as below: I don't know what's the mistake.
select employee_id
from Employees
outer join salaries on Employees.Employee_id=salaries.Employee_id
where name is null or salary is null;
It mentioned I have an error for syntax.