Help me select mutual rows between 6 databases and order the result ?
I have very large databases, 10 databases for users each one containing only one table called index.
SELECT * FROM db1, db2, db3, db4, db5, db6 WHERE db1.index.user_id, db2.index.user_id, db3.index.user_id = db4.index.user_id, db5.index.user_id, db6.index.user_id ORDER BY db1.index.name, db2.index.name, db3.index.name
is there is a way to make this code ???
table index in users databases:
database1
user_id | name | country
.....................................
198 |User1 | egypt
database2
user_id | name | country
.....................................
236 |User2 | uk
database3
user_id | name | country
.....................................
385 |User3 | usa
database4
user_id | status_update | date
.....................................
198 |xxxxx | 2011-08-24 13:00
198 |xxxxxxx | 2011-08-24 10:33
236 |xxxxxxx | 2011-08-24 06:33
database5
user_id | status_update | date
.....................................
198 |xxxxx | 2011-08-24 15:01
385 |xxxxxxx | 2011-08-24 10:33
305 |xxxxx | 2011-08-24 12:11
database6
user_id | status_update | date
.....................................
400 |xxxxxxx | 2011-08-24 10:39
236 |xxxxx | 2011-08-24 09:00
981 |xxxxxxx | 2011-08-23 22:54
i wanna select from the both users databases and status update databases
the mutual or common user_id (users) between the users databases and status update databases.
can any one help me ??????
Edited 3 time(s). Last edit at 08/23/2011 01:43PM by molen victor.
Subject
Written By
Posted
Help me select mutual rows between 6 databases and order the result ?
August 23, 2011 01:10PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.