Simple approach w/o using Union
\nSELECT COALESCE(E.EMPLOYEE_ID,S.EMPLOYEE_ID) AS EMPLOYEE_ID\nFROM EMPLOYEES E\nFULL OUTER JOIN SALARIES S ON E.EMPLOYEE_ID=S.EMPLOYEE_ID\nWHERE E.NAME IS NULL
```\nSELECT COALESCE(E.EMPLOYEE_ID,S.EMPLOYEE_ID) AS EMPLOYEE_ID\nFROM EMPLOYEES E\nFULL OUTER JOIN SALARIES S ON E.EMPLOYEE_ID=S.EMPLOYEE_ID\nWHERE E.NAME IS NULL OR S.SALARY IS NULL\nORDER BY COALESCE(E.EMPLOYEE_ID,S.EMPLOYEE_ID)\n```
['MS SQL Server']