January 7th, 2013, 03:11 PM
Joining 2 tables in Oracle - HELP PLEASE
Basically, i was asked to join Table 1 and Table 2 together in oracle. I have been given the values of Table 1. For example, Depot_ID has value of DEP01, DEP02, DEP02 etc. Therefore, I have to create table 2 with those attributes given below. But the attribute name of the Table 2 is Depot_No which is different.
My question: Is it correct to give the same values of Depot_ID in Table 1 to Depot_No in Table 2, such as, DEP01, DEP02, DEP02?
How to join those two tables below:
January 8th, 2013, 12:08 PM
That is a question of fact. Not one that can be answered in this forum.
You will have to ask whoever set you this task whether Depot_ID and Depot_No refer to the same thing.
February 16th, 2013, 10:02 AM
Yes , you can give same values to Depot_No as you would to column Depot_ID. If you want to join the 2 tables on these columns, then you should define Depot_No as a foreign key that references Depot_id of the parent table. Hope this makes sense.