Re: Urgent help needed- alias name in update statement

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: venkatrao(dot)b(at)tcs(dot)com
Cc: pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: Urgent help needed- alias name in update statement
Date: 2010-03-09 14:27:20
Message-ID: 4B965AC8.5020004@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On 09/03/2010 13:51, venkatrao(dot)b(at)tcs(dot)com wrote:
> Hello,
>
> In postgre, when i am trying to give alias name in update statement like
> below -
>
> ---------------------------------
> update mytable x
> set x.name = 'asdf'
> where x.no = 1
> -------------------------------

Leave leave off the "x." :

update mytable
set name = 'asdf'
where no = 1;

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2010-03-09 14:32:40 Re: has_schema_privilege function
Previous Message Adrian Klaver 2010-03-09 14:26:35 Re: Urgent help needed- alias name in update statement

Browse pgsql-novice by date

  From Date Subject
Next Message Greg Stark 2010-03-09 14:32:40 Re: has_schema_privilege function
Previous Message Adrian Klaver 2010-03-09 14:26:35 Re: Urgent help needed- alias name in update statement