Home » SQL & PL/SQL » SQL & PL/SQL » Cannot use Using Clause with natural Join
Cannot use Using Clause with natural Join [message #189993] Mon, 28 August 2006 23:40 Go to next message
cgk1983
Messages: 28
Registered: December 2005
Junior Member
I have two tables

NATURAL1

Name Null? Type
--------------------
COL1 Yes NUMBER
COL2 Yes NUMBER


NATURAL2

Name Null? Type
--------------------
COL1 Yes NUMBER
COL2 Yes VARCHAR2(100)

Now since naturaljoin will not happen on these two columns
since col2 datatype is different

I want to do Natural join on the column " COL1 " with help of "USING" Keyword like this

select * from natural1 natural join natural2 using(col1)

but gave error

select * from natural1 natural join natural2 using(col1)
ORA-00933: SQL command not properly ended


Wy is this Error or we cannot use Using Clause with natural Join
Re: Cannot use Using Clause with natural Join [message #190004 is a reply to message #189993] Tue, 29 August 2006 00:31 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
What makes you think USING can be used in combination with natural join? Natural join is meant to join all columns with the same name.

Why don't you just use a 'normal' join using col1?
Re: Cannot use Using Clause with natural Join [message #190014 is a reply to message #190004] Tue, 29 August 2006 01:04 Go to previous messageGo to next message
cgk1983
Messages: 28
Registered: December 2005
Junior Member
So u mean to say using cannot be used with natural join
Re: Cannot use Using Clause with natural Join [message #190015 is a reply to message #190014] Tue, 29 August 2006 01:05 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
cgk1983 wrote on Tue, 29 August 2006 08:04

So u mean to say using cannot be used with natural join

Nod That's what Frank said. Have you checked the manuals on ANSI joins?

MHE
Previous Topic: sql script
Next Topic: how to disable one user and how to enable one user.
Goto Forum:
  


Current Time: Sat Dec 10 22:28:10 CST 2016

Total time taken to generate the page: 0.08817 seconds