Re: table alias on update and delete query

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: chester c young <chestercyoung(at)yahoo(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: table alias on update and delete query
Date: 2002-01-19 20:08:24
Message-ID: 20020119120642.X76854-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Sat, 19 Jan 2002, chester c young wrote:

> is there no table alias on update and dml query? is there workaround?

AFAIK, only use the full table name and alias any other copies.

> egg=# update lw_pres p1 set pid=pid+1
> egg(# where exists( select 1 from lw_pres p2
> egg(# where p1.pid = p2.pid and p1.oid < p2.oid );
>
> ERROR: parser: parse error at or near "p1"

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Murray Prior Hobbs 2002-01-20 07:57:37 Re: pltlc and pltlcu problems
Previous Message chester c young 2002-01-19 18:53:55 table alias on update and delete query