Search Postgresql Archives

Re: Question About UNION

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 9, 2008 at 3:31 PM, Bill Thoen <bthoen@xxxxxxxxxx> wrote:

> Thanks, but that didn't work. That selected only the records from table1.

That's why I warned you about it being written in gmail. :)

select * from table1
union
select table2.* from table2 left join table1 on table2.a=table1.a and
table2.b=table1.b where table1.a is null;

This should probably do it without the temp table (the first version
was checking for null in the wrong place).
-- 
- David T. Wilson
david.t.wilson@xxxxxxxxx


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux