Connecting Tech Pros Worldwide Forums | Help | Site Map

joining 3 tables-using oracle 10g

Member
 
Join Date: Mar 2007
Posts: 52
#1: Sep 11 '09
There are 3 tables-
1st table
Name
Point

2nd table
Id
Point1
Point2

3rd table
Id
Type
Status

I need to join all tables. I will join table 1 and 2 like this-
Select * from table 1 t, table 1 t1, table 2 t2 where t.point =t2.point1 and t1.point=t2.point

With the result of above query, I need to join table 3 on the basis of fields ‘id’ in table 2 and table 3.
Can someone please let me know the query?

debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,511
#2: Sep 13 '09

re: joining 3 tables-using oracle 10g


you have already joined all the three tables.
OraMaster's Avatar
Member
 
Join Date: Aug 2009
Location: Pune, India
Posts: 76
#3: Sep 14 '09

re: joining 3 tables-using oracle 10g


Quote:

Originally Posted by Garima12 View Post

There are 3 tables-
1st table
Name
Point

2nd table
Id
Point1
Point2

3rd table
Id
Type
Status

I need to join all tables. I will join table 1 and 2 like this-
Select * from table 1 t, table 1 t1, table 2 t2 where t.point =t2.point1 and t1.point=t2.point

With the result of above query, I need to join table 3 on the basis of fields ‘id’ in table 2 and table 3.
Can someone please let me know the query?

If I am not wrong then ur tables are as below
Table1(point,name)
Table2(id,point1,point2)
Table3(id,type,status)
then
u need to have joins like
Expand|Select|Wrap|Line Numbers
  1. table1.point = table2.point and table2.id = table3.id
I hope it would help u.
regds,
Bhushan
Reply


Similar Oracle Database bytes