Solved

INNER JOIN in oracle 8i

Posted on 2007-11-16
4
4,822 Views
Last Modified: 2013-12-19
SELECT * FROM
TABLE1 a
INNER JOIN TABLE2 b ON (a.KEY_ID=b.KEY_ID)

doesnt this work on 8i???

what could be easy solution?..i know the option of writing a,b where a.key_id=b.key_id..



0
Comment
Question by:koolsyed
  • 2
4 Comments
 
LVL 18

Expert Comment

by:Jinesh Kamdar
ID: 20299611
Of course it does. What error do u get ?

select * from dual a inner join dual b on (a.dummy = b.dummy)

DUMMY DUMMY_1
X            X
0
 
LVL 34

Accepted Solution

by:
johnsone earned 50 total points
ID: 20299710
If you database version is really 8i, then Oracle does not support the ANSI join syntax until Oracle 9.

In Oracle 8, you get:

SQL> select * from dual a inner join dual b on (a.dummy = b.dummy);
select * from dual a inner join dual b on (a.dummy = b.dummy)
                     *
ERROR at line 1:
ORA-00933: SQL command not properly ended

In Oracle 9, you get:

SQL> select * from dual a inner join dual b on (a.dummy = b.dummy);

D D
- -
X X

0
 

Author Comment

by:koolsyed
ID: 20299738
This is what i am trying..
SELECT mp.a,mp.b        
  FROM M_V_S mvs , M_P mp
  INNER JOIN M_P mp ON (mvs.key_id = mp.key_id)
  ORDER BY a,b;

it says...expecting equals near INNER....
0
 
LVL 18

Expert Comment

by:Jinesh Kamdar
ID: 20299765
Oops, i didnt notice that the question was asked specifically for 8i and just went along with the zones that said Oracle 8.x / Oracle 9.x. No personal hands-on on 8i, but if John says so after trying it, then it would have to be true.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows how to recover a database from a user managed backup
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now