Search Postgresql Archives

Re: Update Join ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> Does Postgres allow updates based on the context of a sub-query,
something like the sample below ?

Yes,

Update real_tab 
set real_tab.data_desc = temp_tab.data_desc
>From temp_tab
Where real_tab.keyID = temp_tab.keyID

(don't repeat your updated table in the "from" list unless you
Mean to self-join)

http://www.postgresql.org/docs/8.3/interactive/sql-update.html



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux