Skip site navigation (1) Skip section navigation (2)

Re: SELECT INTO but append not create new table - How?

From: "Alan T(dot) Miller" <amiller(at)hollywood101(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: SELECT INTO but append not create new table - How?
Date: 2004-01-28 02:40:49
Message-ID: 028301c3e548$24436b30$640a0a0a@webdev (view raw or flat)
Thread:
Lists: pgsql-novice
Thanks, just what I needed :)

Alan


----- Original Message ----- 
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alan T. Miller" <amiller(at)hollywood101(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Sent: Tuesday, January 27, 2004 7:28 PM
Subject: Re: [NOVICE] SELECT INTO but append not create new table - How?


> "Alan T. Miller" <amiller(at)hollywood101(dot)com> writes:
> > I messed around with the 'INSERT INTO' SQL command, but this assumes
that
> > the table you are 'selecting into' does not exist and you want to create
> > that table. My problem is that the table exists and I just want to
append
> > the information to the archive table.
>
> I think you are looking for INSERT ... SELECT.  See the INSERT man page
> or any book about SQL.
>
> regards, tom lane
>



In response to

pgsql-novice by date

Next:From: Phil SerettiDate: 2004-01-28 05:06:54
Subject: Install or Bust - pgsql on Red Hat 9
Previous:From: Tom LaneDate: 2004-01-28 02:28:18
Subject: Re: SELECT INTO but append not create new table - How?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group