Re: CREATE TABLE AS COMMAND - Mailing list pgsql-general

From Greg Stark
Subject Re: CREATE TABLE AS COMMAND
Date
Msg-id 874qwf2j78.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: CREATE TABLE AS COMMAND  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
> On Fri, Dec 05, 2003 at 13:20:27 -0500,
>   Bob Powell <Bob@hotchkiss.org> wrote:
>
> > SELECT * FROM addresses LEFT OUTER JOIN contacts ON
> > contacts.participant_id = addresses.participant_id;
> >
> > Running the select obviously works fine, it's just when I try to create a
> > table when I runn into problems. Do I have to list all of the fields
> > except the one I don't want, or is there another way? Thanks in advance.

You could use USING (participant_id) instead of ON. That only produces a
single participant_id column. It's also less typing.

--
greg

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: CREATE TABLE AS COMMAND
Next
From: Rich Hall
Date:
Subject: Stored FUnctions