Re: UPDATE of several columns using SELECT statement

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: UPDATE of several columns using SELECT statement
Дата
Msg-id 49BFC1F3.8040006@archonet.com
обсуждение исходный текст
Ответ на UPDATE of several columns using SELECT statement  ("adam.slachta" <adam.slachta@xitee.com>)
Список pgsql-general
adam.slachta wrote:
>
> 1. When trying to update two columns
>
> UPDATE myFirstTable SET (fistCol, secCol) = (  SELECT anotherFistCol,
> anotherSecondCol FROM mySecondTable )

In addition to Sam's reply what you've got there would never work anyway
unless mySecondTable only contains one row. You'd need a join. Like Sam
says though, we don't support that syntax.

--
  Richard Huxton
  Archonet Ltd

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

Предыдущее
От: Ivano Luberti
Дата:
Сообщение: Re: COPY command question
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: COPY command question