pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ludwig Lim <lud_nowhere_man@yahoo.com>
To: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Question on OUTER JOINS.
Date: Fri, 27 Jun 2003 22:45:47 -0700 (PDT)
Message-ID: <20030628054547.40824.qmail@web80503.mail.yahoo.com> (raw)


Hi:

  1) Is the ON clause of an OUTER JOIN always
evaluated first before the WHERE clause?

 2) Given the ff SQL statement :

   SELECT employee_id,
          a.status as status
   FROM permissions a LEFT JOIN 
      (select * from employee where employee_id = 3)
as b on (a.status=b.status)
   WHERE a.status='test';

  Is there a way to rewrite the query as a view such
that one can do:

   select *
   from test_view
   where employee_id=3 and status='test';

Thank you very much,

ludwig lim

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



view thread (5+ messages)  latest in thread

Message-ID: <20030628054547.40824.qmail@web80503.mail.yahoo.com>
Permalink:  ../20030628054547.40824.qmail@web80503.mail.yahoo.com/
Also on:    postgresql.org/message-id/20030628054547.40824.qmail@web80503.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lud_nowhere_man@yahoo.com
  Subject: Re: Question on OUTER JOINS.
  In-Reply-To: <20030628054547.40824.qmail@web80503.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox