Re: Problems with bulk update

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Problems with bulk update
Дата
Msg-id 46FB776D.5080406@archonet.com
обсуждение исходный текст
Ответ на Problems with bulk update  (Venelin Arnaudov <v.arnaudov@prosyst.com>)
Ответы Re: Problems with bulk update  (Venelin Arnaudov <v.arnaudov@prosyst.com>)
Список 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 по дате отправления:

Предыдущее
От: Venelin Arnaudov
Дата:
Сообщение: Problems with bulk update
Следующее
От: Venelin Arnaudov
Дата:
Сообщение: Re: Problems with bulk update