Re: What is the syntax for UPDATE from one table to another?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: What is the syntax for UPDATE from one table to another?
Дата
Msg-id 20040312183206.GB7738@wolff.to
обсуждение исходный текст
Ответ на What is the syntax for UPDATE from one table to another?  (pw <p.willis@telus.net>)
Список pgsql-general
On Fri, Mar 12, 2004 at 09:40:13 -0800,
  pw <p.willis@telus.net> wrote:
>
> Hello,
>
> What is the proper syntax for updating a column inone table from
> a column in another?
>
> I have tried this:
>
> UPDATE destination_table FROM source_table SET
> destination_table.column_one = source_table.column_b WHERE constraint;
>
> This fails, so I must have the syntax incorrect.

If you check the documentation you will see that SET is supposed to be before
FROM.

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

Предыдущее
От: Jeff
Дата:
Сообщение: Re: What is the syntax for UPDATE from one table to another?
Следующее
От: Jerry LeVan
Дата:
Сообщение: Where are PL/pgsql definitions kept?