MYSQL: Implementing FULL JOIN by Using UNION for Beginners like me.
MySQL does not support FULL JOIN, so you have to combine JOIN, UNION and LEFT JOIN to get an equivalent. Here is an another way:\n\n\nSELECT sub.employee_id\nFR
MySQL does not support FULL JOIN, so you have to combine JOIN, UNION and LEFT JOIN to get an equivalent. Here is an another way:\n\n```\nSELECT sub.employee_id\nFROM (\n\tSELECT e.employee_id, name, salary\n\tFROM employees AS e\n\tLEFT JOIN salaries AS s\n\tON e.employee_id = s.employee_id\n\t\n\tUNION\n\t\n\tSELECT s.employee_id, name, salary\n\tFROM employees AS e\n\tRIGHT JOIN salaries AS s\n\tON e.employee_id = s.employee_id) AS sub\nWHERE sub.name IS NULL OR sub.salary IS NULL\nORDER BY sub.employee_id\n```\n\nContributions are appreciated...\n\n
['MySQL']