Re: Problems with bulk update - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Problems with bulk update
Date
Msg-id 46FB776D.5080406@archonet.com
Whole thread Raw
In response to Problems with bulk update  (Venelin Arnaudov <v.arnaudov@prosyst.com>)
Responses Re: Problems with bulk update
List pgsql-sql
Venelin Arnaudov wrote:
> Hi
> 
> I want to update the values of one column of a table based on the
> matches in a second table

> something like
> update table1
>  set table1.field2_new=table2.new_id
>  from table2
>  where table1.field2_old=table2.old_id;

Did you try it?

http://www.postgresql.org/docs/8.2/static/sql-update.html

PG has a non-standard "FROM" extension for just this purpose.

--   Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: Venelin Arnaudov
Date:
Subject: Problems with bulk update
Next
From: Venelin Arnaudov
Date:
Subject: Re: Problems with bulk update