Simple MySQL solution [UNION]
In this problem we are required to write an SQL query to report the IDs of all the employees with missing information. The information of an employee is missing
In this problem we are required to write **an SQL query to report the IDs of all the employees with missing information. The information of an employee is missing if:**\n\n**The employee\'s name is missing, or\nThe employee\'s salary is missing.**\n\nAnd we also are supposed to return the result table **return the result table ordered by employee_id in ascending order.**\n\nUsing the **NOT IN query before UNION** I have checked if the **name is misssing**\n\n```\nSELECT employee_id \nFROM Employees\nWHERE employee_id \nNOT IN (SELECT employee_id FROM Salaries)\n```\n\nUsing the **NOT IN query after UNION** I have checked if the **name is misssing**\n\n```\nSELECT employee_id \nFROM Salaries\nWHERE employee_id \nNOT IN (SELECT employee_id FROM Employees)\n```\n\nNow using **UNION** to merge both queries.\n```\nSELECT employee_id \nFROM Employees\nWHERE employee_id \nNOT IN (SELECT employee_id FROM Salaries)\n\nUNION\n\nSELECT employee_id \nFROM Salaries\nWHERE employee_id \nNOT IN (SELECT employee_id FROM Employees)\n```\n\nAt last ordering them by id.\n**COMPLETE CODE:**\n```\n# Write your MySQL query statement below\nSELECT employee_id \nFROM Employees\nWHERE employee_id \nNOT IN (SELECT employee_id FROM Salaries)\n\nUNION\n\nSELECT employee_id \nFROM Salaries\nWHERE employee_id \nNOT IN (SELECT employee_id FROM Employees)\n\nORDER BY employee_id;\n```
['Union Find', 'MySQL']