mysql full outer join
SQL[Edit]
+
0
-
0
MySQL FULL OUTER JOIN
1 2 3 4 5SELECT * FROM table_a A LEFT JOIN table_b B ON A.key = B.key UNION SELECT * FROM table_a A RIGHT JOIN table_b B ON A.key = B.key
[Edit]
+
0
-
0
MySQL Full Outer Join
1 2 3 4 5 6 7SELECT * FROM `users` LEFT JOIN `departments` ON `departments`.`id` = `users`.`department_id` UNION SELECT * FROM `users` RIGHT JOIN `departments` ON `departments`.`id` = `users`.`department_id`
[Edit]
+
0
-
0
MySQL Full Outer Join
1 2 3 4 5SELECT * FROM `table1` LEFT JOIN `table2` ON `table2`.`column_name` = `table1`.`column_name` UNION SELECT * FROM `table2` RIGHT JOIN `table2` ON `table2`.`column_name` = `table1`.`column_name`;