Home » SQL & PL/SQL » SQL & PL/SQL » JOIN USING  () 1 Vote
JOIN USING [message #261782] Thu, 23 August 2007 10:35 Go to next message
Messages: 295
Registered: May 2007
Senior Member
Hello All,

I've read in the Oracle Press edition SQL 9i book that NON - EQUI Join ( ORACLE ) and JOIN USING(ANSI SQL) are one and the same. I mean they work in the same way.

Say for ex: the query in NON EQUI JOIN looks like

> select e.ename,s.grade from emp e,salgrade s
where e.sal between s.losal and s.hisal;

The above query will fetch the records of all the employee names and their salary grades .

Now can I get the same output using JOIN USING..

Please let me know .


Re: JOIN USING [message #261840 is a reply to message #261782] Thu, 23 August 2007 14:57 Go to previous message
Messages: 2844
Registered: May 2007
Location: Scotland
Senior Member
You appear to have misunderstood whatever text you have read, because the situation you describe is simply not true. The USING clause of the JOIN clause is based on equality and matching column names

select col1, col2
from tab1, tab2
where tab1.cola = tab2.cola
and tab1.colb = tab2.colb

is the same as
select col1, col2
from tab1
join tab2
using(cola, colb)
Previous Topic: spooling to file SP2-0734
Next Topic: PL/SQL
Goto Forum:

Current Time: Thu Aug 17 01:15:25 CDT 2017

Total time taken to generate the page: 0.11082 seconds