Search Postgresql Archives

table alias for update

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

 




is there a way to use a table alias for the target table in an UPDATE query?
I would like to avoid spelling out things like that in psql:

update myverylongtablename set col1 = r.col1repl from repltable r 
 where myverylongtablename.id = r.id and myverylongtablename.col2 > 0

Regards
Wolfgang Hamann


-- 
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