Re: Select into

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: Select into
Дата
Msg-id 65937bea0803200358i290bdc87hdeca777b593b5df1@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Select into  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Ответы Re: Select into
Список pgsql-sql
On Thu, Mar 20, 2008 at 4:19 PM, A. Kretschmer <andreas.kretschmer@schollglas.com> wrote:
am  Thu, dem 20.03.2008, um 20:57:53 +1100 mailte Gavin 'Beau' Baumanis folgendes:
> Hi Everyone,
>
> I have asked our DBA at work and h is not too sure either... so I
> thought it best to on the list.
>
> Basically, what I am after is a way to copy the contents of one record
> into another.
> Something like select into; but where the destination record already
> exists, as opposed to creating a new record.

insert into <table> select from <table> where ...


He specifically asked for

<snip>

where the destination record already
exists, as opposed to creating a new record.

</snip>


    I think an UPDATE with joins would be helpful. Though, it may become lengthy if the tables have too many columns.

    Can you post your exact requirement?

--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

17° 29' 34.37"N, 78° 30' 59.76"E - Hyderabad *
18° 32' 57.25"N, 73° 56' 25.42"E - Pune
37° 47' 19.72"N, 122° 24' 1.69" W - San Francisco

http://gurjeet.frihost.net

Mail sent from my BlackLaptop device

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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Select into
Следующее
От: Gavin 'Beau' Baumanis
Дата:
Сообщение: Re: Select into