Re: table alias for update

Поиск
Список
Период
Сортировка
От Bosco Rama
Тема Re: table alias for update
Дата
Msg-id 4F6ECA19.8030201@boscorama.com
обсуждение исходный текст
Ответ на table alias for update  (hamann.w@t-online.de)
Список pgsql-general
hamann.w@t-online.de wrote:
>
> 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

update myverylongtablename as xyz
    set col1 = ...
    where xyz.id = ...;

The 'as' is optional ... though easier to read IMO.

HTH

Bosco.

В списке pgsql-general по дате отправления:

Предыдущее
От: hamann.w@t-online.de
Дата:
Сообщение: table alias for update
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: Help in Parsing PG log usings CSV format