#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    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:

    Table 1:

    Depot_ID
    Address
    Location

    Table 2:

    Product_ID
    Depot_No
    Quantity
    Aisle
    Bay


    Thank You
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,055
    Rep Power
    383
    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?
    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.

    Clive
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    5
    Rep Power
    0
    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.

IMN logo majestic logo threadwatch logo seochat tools logo