Home » SQL & PL/SQL » SQL & PL/SQL » Joining tables where not all tables have relevant records
Joining tables where not all tables have relevant records [message #8831] Mon, 29 September 2003 08:34 Go to next message
Mark Fretwell
Messages: 2
Registered: September 2003
Junior Member
Hello all,

I am trying to join several tables together where some of the tables may not have a record for all the records in the other tables. I need to return the values where this happens, as well as all the others e.g;-

Table 'one'
UID Colour
123 Yellow
456 Black
789 Orange

Table 'two'
UID Points
123 2
456 7

Table 'three'
UID Favourite
123 John
789 Sam

I can get
UID Colour Points Favourite
123 Yellow 2 John

from a standard
where one.uid = two.uid and two.uid = three.uid
type of query

but I need
UID Colour Points Favourite
123 Yellow 2 John
456 Black 7
789 Orange Sam

as my results

All help gratefully accepted.

Regards,
Mark.
Re: Joining tables where not all tables have relevant records [message #8836 is a reply to message #8831] Mon, 29 September 2003 11:36 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
See reply in SQL forum. Please do not crosspost.
Previous Topic: Querying across multiple tables where not in all tables.
Next Topic: Best way to find no. of rows in a table
Goto Forum:
  


Current Time: Thu Apr 25 13:09:14 CDT 2024