How to use outer join in update

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: pgsql-general(at)postgresql(dot)org
Subject: How to use outer join in update
Date: 2006-12-07 18:02:43
Message-ID: el9l1e$rh4$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In my current DBMS I can use

create table t1 ( f1 int, f2 int );
create table t2 ( f3 int, f4 int );
update t1 set f1=t2.f3 from t1 left join t2 on t1.f2=t2.f4

This does not work in Postgres.

How to convert this statement to Postgres 8.1 ?

Andrus.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2006-12-07 18:02:58 Re: Vote for your favorite database
Previous Message Tony Caduto 2006-12-07 17:59:30 Vote for your favorite database