> I want to find the rows that dont appear in both tables. So I think I
> need a full outer join which I understand is not supported by SQLite
> I have seen this which gives an alternative, but it seems very complex
> http://en.wikipedia.org/wiki/Join_%28SQL%29#Full_outer_join
> Is there an easier way?

It looks hairy but here's what it's doing. Given tables A,B:

1. Do the regular join (all rows with matches in both A and B)
2. Find rows in A that aren't in B
3. Find rows in B that aren't in A
4. Concatenate those 3 queries together with UNION ALL

Part of the reason the wikipedia one looks complex is that it is worried about 
types (all of the CAST stuff). But you don't have to worry about types in 
sqlite, because each cell has a type rather than each column.

> and, I am sure this has been asked before, but out of interest why are
> full out joins not supported?

I can't speak for *why* it's not supported directly, but you can emulate it 
with the above type of query

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to