Re: What is the syntax for UPDATE from one table to another? - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: What is the syntax for UPDATE from one table to another?
Date
Msg-id 20040312183206.GB7738@wolff.to
Whole thread Raw
In response to What is the syntax for UPDATE from one table to another?  (pw <p.willis@telus.net>)
List 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 by date:

Previous
From: Jeff
Date:
Subject: Re: What is the syntax for UPDATE from one table to another?
Next
From: Jerry LeVan
Date:
Subject: Where are PL/pgsql definitions kept?