Re: Copying rows between tables? - Mailing list pgsql-sql

From Reinoud van Leeuwen
Subject Re: Copying rows between tables?
Date
Msg-id 20040113173226.X66382@spoetnik.xs4all.nl
Whole thread Raw
In response to Copying rows between tables?  (Steve Wampler <swampler@noao.edu>)
List pgsql-sql
On Tue, Jan 13, 2004 at 09:23:48AM -0700, Steve Wampler wrote:
> 
> I know I can select from one table into a new table, but is
> there a way to select from one table into an existing table
> (aside from copying everything to a file, editing the file
> and then copying from that file)?  Without destroying existing
> entries, of course...

insert into desttable (col1, col2, col3)
select col1, col2, col3 from sourcetable
where somecol = somevalue;


-- 
__________________________________________________
"Nothing is as subjective as reality"
Reinoud van Leeuwen    reinoud.v@n.leeuwen.net
http://www.xs4all.nl/~reinoud
__________________________________________________


pgsql-sql by date:

Previous
From: "Viorel Dragomir"
Date:
Subject: Re: Copying rows between tables?
Next
From: "Bing Du"
Date:
Subject: can insert 'null' into timestamp type field from command line but not from input file?