Re: CREATE TABLE AS COMMAND

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: CREATE TABLE AS COMMAND
Date: 2003-12-05 18:49:47
Message-ID: 874qwf2j78.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> On Fri, Dec 05, 2003 at 13:20:27 -0500,
> Bob Powell <Bob(at)hotchkiss(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rich Hall 2003-12-05 19:22:26 Stored FUnctions
Previous Message Bruno Wolff III 2003-12-05 18:39:25 Re: CREATE TABLE AS COMMAND