Re: Oracle outer join porting question

From: "Dan Langille" <dan(at)langille(dot)org>
To: "Marko Asplund" <aspa(at)kronodoc(dot)fi>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Oracle outer join porting question
Date: 2003-01-15 15:01:45
Message-ID: 3E253189.3484.2EE06930@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 15 Jan 2003 at 16:40, Tambet Matiisen wrote:

> Try this:
>
> SELECT doc.id,doc.title,sub.user_id,sub.operation
> FROM document doc LEFT OUTER JOIN document_subscription sub
> ON sub.document_id = doc.id AND sub.user_id = 6;

FWIW:

test=# SELECT doc.id,doc.title,sub.user_id,sub.operation
test-# FROM document doc LEFT OUTER JOIN document_subscription sub
test-# ON sub.document_id = doc.id AND sub.user_id = 6;
id | title | user_id | operation
----+-------+---------+-----------
1 | doc1 | |
2 | doc2 | 6 | op2
4 | doc4 | |
--
Dan Langille : http://www.langille.org/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andreas Joseph Krogh 2003-01-15 15:04:46 Re: index on to_char(created, 'YYYY') doesn't work
Previous Message Achilleus Mantzios 2003-01-15 15:00:20 Re: Performance of request of type WHERE ... IN ( ... )