Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Joins

Re: Joins

From: sybrandb <sybrandb_at_gmail.com>
Date: 1 Dec 2006 23:24:20 -0800
Message-ID: <1165044260.270847.295380@n67g2000cwd.googlegroups.com>

BigLearner wrote:
> Dear buddies,
>
> I am a new member to this group.
>
> Looking forward to build up myself towards future.
>
> I have a doubt on joins.
>
> select e.empno, e.ename, d.loc
> from emp e, dept d
> where e.deptno = d.deptno
> and substr(e.ename,1,1) = 'S';
>
> How can I rewrite it in ANSI compliant equivalent statement usable on
> the Oracle database?
>
> select empno, ename, loc
> from emp join dept
> on emp.deptno = dept.deptno
> where substr(emp.ename,1,1) = 'S';
>
> or
>
> select empno, ename, loc
> from emp join dept
> on emp.deptno = dept.deptno
> and substr(emp.ename,1,1) = 'S';
>
> Which one of them is right, using where or and for the last condition?
>
> Do guide me.
>
> Thanks.
>
> BigLearner

Learning requires reading manuals. Obviously this issue is documented in the SQL reference manual online at http://tahiti.oracle.com. As you can post, you seem to be able to read a manual. Please do so! This forum should not be abused as a replacement for reading manuals.

-- 
Sybrand Bakker
Senior Oracle
Received on Sat Dec 02 2006 - 01:24:20 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US