83 84 joins and null values joins and null example

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: are duplicates if corresponding columns are equal or both are null All other aggregate operators discard null values. 83 84 Joins and NULL Values Joins and NULL Example Outer join - allows rows in one or both of the two tables being joined to appear in result even if no match in other table Sailors Example: Join of Sailors and Reserves sid sname rating 22 Dustin 31 58 left outer join - Sailors rows with no matching rows in Reserves will appear with value of NULL for columns inherited from Reserves Reserves age sid bid day 7 45 22 101 10/10/96 Lubber 8 55 58 103 11/12/96 Rusty 10 35 right outer join - Reserves rows with no matching rows in Sailors will appear with value of NULL for columns inherited from Sailors full outer join - Both Sailors rows and Reserves rows with no matching rows in other table will be included, padded with NULL values appropriately. appropriately. 85 85 SELECT Sailors.sid, Reserves.bid FROM Sailors LEFT JOIN Reserves ON Sailors.sid = Reserves.sid; 86...
View Full Document

This note was uploaded on 10/15/2012 for the course CSE 4503 taught by Professor Edallen during the Fall '12 term at Mississippi State.

Ask a homework question - tutors are online