| From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
|---|---|
| To: | guard <guard(at)ficnet(dot)net> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: how to simulate UPdate ...? |
| Date: | 2001-02-06 00:37:27 |
| Message-ID: | Pine.BSF.4.21.0102051631230.39621-100000@megazone23.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 be
multiple rows returned by the subselect
since there'd be no way to know which
table2.na1 you'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);
>
>
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joy Chuang | 2001-02-06 02:01:30 | CREATE TABLE AS and ORDER BY |
| Previous Message | David Olbersen | 2001-02-06 00:16:11 | Re: SQL Join - MySQL/PostgreSQL difference? |