Write SQL statements to (1) create the BREED table, (2) insert the data in Figure 3-21 into the BREED table, (3) alter the PET_3 table so that PetBreed is a foreign key referencing BreedName in BREED, and (4) with the BREED table added to the pet database, write an SQL statement to display the last name, first name, and email of any owner of a pet that has an AverageLifeExpectancy value greater than15. Use a subquery

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter3: Creating Tables
Section: Chapter Questions
Problem 4TD
icon
Related questions
Question

Write SQL statements to (1) create the BREED table, (2) insert the data in Figure 3-21 into the BREED table, (3) alter the PET_3 table so that PetBreed is a foreign key referencing BreedName in BREED, and (4) with the BREED table added to the pet database, write an SQL statement to display the last name, first name, and email of any owner of a pet that has an AverageLifeExpectancy value greater than
15. Use a subquery

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Knowledge Booster
SQL Query
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning