Re: Subquery in INSERT?

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Subquery in INSERT?
Дата
Msg-id 20061017121321.GE19268@a-kretschmer.de
обсуждение исходный текст
Ответ на Subquery in INSERT?  ("Wilfred Benson" <hairymcfarsen@hotmail.com>)
Список pgsql-novice
am  Tue, dem 17.10.2006, um  5:06:59 -0700 mailte Wilfred Benson folgendes:
> What I'm trying to do is copy a value from one column to another in the
> same table. The table looks like this:
>
>  first | second
> ---------------------
> 1      |
> 2      |
> 3      |
> 4      |
> ...
>
> It's named 'copier'.
>
> The first column is sequence-generated, and the second has yet to have
> anything loaded (at this stage it's only a test table). So what I'm trying
> to do is quick copy of '1' from 'first' to 'second' with this query:

update copier set second = first;


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

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

Предыдущее
От: "Wilfred Benson"
Дата:
Сообщение: Subquery in INSERT?
Следующее
От: Shane Ambler
Дата:
Сообщение: Re: Subquery in INSERT?