Thread: how to simulate UPdate ...?

how to simulate UPdate ...?

From
"guard"
Date:
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);






Re: how to simulate UPdate ...?

From
Stephan Szabo
Date:
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);
> 
> 
> 
>