Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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

pgsql-novice by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group