Create a new table from records not joined in a left outer join

From: Sindile Bidla <sindile(dot)bidla(at)gmail(dot)com>
To: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Create a new table from records not joined in a left outer join
Date: 2012-09-13 05:55:16
Message-ID: CA+fb49Z9J86n+bUPBy0JYseULgdZv_ruBL439cLyRZmjhLWnyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I have a query of a left outer join

CREATE TABLE table3
AS SELECT d.*, u.*
FROM table1 d
LEFT OUTER JOIN table2 u
ON (d.id = u.sgno);

What i would like to do within the same query is to be able to create a new
table with all the records of table2 that are not joined to table1.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jayadevan M 2012-09-13 05:59:03 Re: Create a new table from records not joined in a left outer join
Previous Message James David Smith 2012-09-12 15:39:07 Interpolating Values