Oracle 11g - How to retrieve data from multiple related tables - TechRepublic
Question
July 13, 2009 at 01:03 PM
csgs

Oracle 11g – How to retrieve data from multiple related tables

by csgs . Updated 16 years, 11 months ago

I am trying to create a sql script that uses data that resides in different tables. I need 3-4 different columns from one table and I need one column from another table – all to show up in the same results.

Further details:

Table 1: Shipment_Stop
Columns: Shipment_ID, Stop_Number, Location_ID

Table 2: Location
Columns: Location_Name

The Shipment_Stop table Foreign Keys into the Location table.

My script needs to pull the Shipment ID, Stop Number, Location ID and Location Name and the WHERE clause is ‘where shipment_id = ‘XXXXX’

How can I get the results for Location Name when that data resides under a different table?

This discussion is locked

All Comments