Is there a reason MySQL doesn't support FULL OUTER JOINS?

MySQL lacks a lot of functionality that other databases have*. I think they have a pretty huge backlog of ideas and not enough developers to implement them all.

This feature was requested in 2006 and is still not implemented. I guess it has low priority because you can work around it by combining LEFT and RIGHT OUTER JOIN with a UNION ALL. Not pleasant, but it does the trick. Change this:

SELECT *
FROM table1
FULL OUTER JOIN table2
ON table1.table2_id = table2.id

to this:

SELECT *
FROM table1
LEFT JOIN table2
ON table1.table2_id = table2.id
UNION ALL
SELECT *
FROM table1
RIGHT JOIN table2
ON table1.table2_id = table2.id
WHERE table1.table2_id IS NULL

* To be fair to MySQL, they also have some features that many other databases don't have.


I don't believe the MySQL devs have ever stated any technical reason why it might be difficult to implement.

But MySQL, like most DBMSs, has many places where it does not fully implement the ANSI standard. Since FULL OUTER JOIN is a rarely-used feature, and can typically be replaced by a UNION workaround, there is little pressure to get it fixed.

I suggest adding your voice to bug 18003.


Because it was never implemented by MySQL developers. Why? Because there was not enough pressure from customers.

Tags:

Mysql

Sql