Re: how to simulate UPdate ...? - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: how to simulate UPdate ...?
Date
Msg-id Pine.BSF.4.21.0102051631230.39621-100000@megazone23.bigpanda.com
Whole thread Raw
In response to how to simulate UPdate ...?  ("guard" <guard@ficnet.net>)
List pgsql-sql
Isn't this equivalent to?
update table1 set na1=(select table2.na1 from table2 where  table1.no=table2.no);

Which can also be invalid if there can bemultiple rows returned by the subselectsince there'd be no way to know
whichtable2.na1you'd want without more info.
 

On Fri, 2 Feb 2001, guard wrote:

> I not run update.... in Pgsql
> 
> please tell me other method
> thanks
> 
> ======================================
> update table1 a set na1=
> (select table2.na1 from table2,table1
> where table1.no=table2.no
> and a.no=table1.no);
> 
> 
> 
> 



pgsql-sql by date:

Previous
From: David Olbersen
Date:
Subject: Re: SQL Join - MySQL/PostgreSQL difference?
Next
From: Thomas Lockhart
Date:
Subject: Re: How to modify type in table?