Re: Copying rows between tables?

Поиск
Список
Период
Сортировка
От Reinoud van Leeuwen
Тема Re: Copying rows between tables?
Дата
Msg-id 20040113173226.X66382@spoetnik.xs4all.nl
обсуждение исходный текст
Ответ на Copying rows between tables?  (Steve Wampler <swampler@noao.edu>)
Список 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 по дате отправления:

Предыдущее
От: "Viorel Dragomir"
Дата:
Сообщение: Re: Copying rows between tables?
Следующее
От: "Bing Du"
Дата:
Сообщение: can insert 'null' into timestamp type field from command line but not from input file?