Skip to content
Advertisement

Get data from both table, where data isn’t common for this tables

I have 2 tables

TABLE jt1

and TABLE jt2

I need get names from both tables, which is not common for both tables, that is result must be

This is my query, but may be there is better solution for this?

Advertisement

Answer

BTW: the naive solution could probably be faster:

BTW: I purposely use UNION ALL here, because I know that the two legs cannot have any overlap, and the removal of duplicates can be omitted.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement