|
Posted by Ed Murphy on 06/13/07 04:25
undercups wrote:
> The answer is to write 3 queries, 1 for each situation you describe
> and link the output using the UNION ALL statement
>
> Something like
>
> SELECT a.id, a.col1, a.col2, a.col3, b.col4 FROM table1 a JOIN table2
> b on a.id = b.id
> WHERE a.col1 <> b.col1
> UNION ALL
(etc.)
The problem is that, if the tables don't have primary keys, then they
may not have a column like 'id'. (Or maybe they do, and it just isn't
defined as a primary key - in which case, why not?)
[Back to original message]
|