INFO 328 HW 3

INFO 328 HW 3 - PET_OWNER AS O, PET AS P WHERE O.OwnerID =...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework Assignment #3 (3.19, 3.26, 3.34, 3.35, 3.36, 3.37, 3.38, 3.40) 3.19 SELECT Breed FROM PET; 3.26 SELECT Name, Breed FROM PET ORDER BY Name; 3.34 SELECT Name, Email FROM PET_OWNER WHERE Type IN (SELECT Type FROM PET WHERE Breed = ‘Cat’); 3.35 SELECT Name, Email FROM PET_OWNER WHERE Name = Teddy AND Type IN (SELECT Type FROM PET WHERE Breed = ‘Cat’); 3.36 SELECT Name, Email FROM PET_OWNER WHERE Type IN (SELECT Type FROM PET WHERE BreedName (SELECT BreedName FROM BREED WHERE AverageLifeExpectancy >= 15)); 3.37 SELECT Name, Email FROM PET_OWNER AS O, PET AS P WHERE O.OwnerID = P.OwnerID AND Breed = ‘Cat’; 3.38 SELECT Name, Email FROM
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PET_OWNER AS O, PET AS P WHERE O.OwnerID = P.OwnerID AND Breed = Cat AND Name = Teddy; 3.40 SELECT Name, Email FROM PET_OWNER AS O LEFT JOIN PET AS P ON O.OwnerID = P.OwnerID WHERE Breed = Cat; It differs from question 3.37 because the left join syntax will not leave out one of the values that does not match the OwnerID in the Breed table. In 3.40 it will post or append rows of PET_OWNER to PET even if any row in the table on the left side of the FROM clause has no match or is blank....
View Full Document

This note was uploaded on 04/13/2008 for the course INFO 328 taught by Professor Norton during the Spring '08 term at Texas A&M.

Page1 / 2

INFO 328 HW 3 - PET_OWNER AS O, PET AS P WHERE O.OwnerID =...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online