Update Join Query

From: "Daniel Futerman" <daniel(dot)futerman(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Update Join Query
Date: 2008-06-23 19:43:39
Message-ID: 6ca02fc80806231243y6e4ea774x6ae4967fb8824447@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Looking for the correct syntax for an UPDATE LEFT JOIN query in PostgreSQL.

The equivalent MySQL query is :

UPDATE
Foo f LEFT JOIN Goo g on f.Foo_ID = g.Goo_ID
SET
f.Foo_ID = g.Goo_ID
WHERE
f.Foo_ID IS NOT NULL;

When I try to run this in Postgres, i get the following error:

ERROR: syntax error at or near "LEFT"

Is it possible to have UPDATE JOIN queries in PostgreSQL?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kynn Jones 2008-06-23 19:45:22 Re: limits?
Previous Message salman 2008-06-23 19:40:15 Re: dbsize command