Re: Copying data from one table to another

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Copying data from one table to another
Дата
Msg-id 200402281640.26882.dev@archonet.com
обсуждение исходный текст
Ответ на Copying data from one table to another  (Erwin Van de Velde <erwin.vandevelde@ua.ac.be>)
Список pgsql-general
On Saturday 28 February 2004 16:08, Erwin Van de Velde wrote:
>
> I have to copy data from one table to another, and I was wondering if there
> is an easier way to do that than to have a lot of inserts one after
> another.

> Is there a trick to let the INSERT
> command take more than one tuple at once?

Think in sets. As long as you can define the conditions for copying rows:

INSERT INTO table2 SELECT * FROM table1 WHERE somefield='some value';

--
  Richard Huxton
  Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Erwin Van de Velde
Дата:
Сообщение: Copying data from one table to another
Следующее
От: "Karl O. Pinc"
Дата:
Сообщение: Triggers per transaction, workaround? prospects?