table alias for update

From: hamann(dot)w(at)t-online(dot)de
To: pgsql-general(at)postgresql(dot)org
Subject: table alias for update
Date: 2012-03-25 07:16:53
Message-ID: wolfgang-1120325091653.A0228608@amadeus3.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bosco Rama 2012-03-25 07:32:41 Re: table alias for update
Previous Message hamann.w 2012-03-25 07:16:51 can these queries be combined into one?