Is there a join that does this?

0

0to60

I need an INNER JOIN of TableA and TableB, and then I also want the rows of
TableA that DON'T have a match in TableB, and then vice versa. So basically
every row from both tables would be represented, and any rows that matched
up would be joined. Kinda like a LEFT JOIN plus a RIGHT JOIN.

Is there a way to get this?
 
L

Lord Kelvan

yeah use a union query

select tablea.*,tableb.*
from tablea left join tableb on tablea.id = tableb.id
union
select tablea.*,tableb.*
from tablea right join tableb on tablea.id = tableb.id

that query should and i say should cause it is untested preduce no
duplicates because it is union and not union all.

hope this helps

Regards
Kelvan
 
L

Lord Kelvan

i realised after making my above post that that is a technical
impossibility because it woudl state you have a many to many join with
no table inbetween can you tell me your table structure.

Regards
Kelvan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top