Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Below are tables that represent the contents of our two tables. For simplicity, BusinessEntityID are a numeric field, and the rest are VARCHAR fields. (I

 
Below are tables that represent the contents of our two tables. For simplicity, BusinessEntityID are a numeric field, and the rest are VARCHAR fields. (I will use quotes around their values as a reminder) If there is nothing written for a column in a particular row, consider the value to be NULL. (i.e. it has NO value) Person.Person 
BusinessEntityID FirstName LastName
1 "Belinda" "Wood"
2 "David" "Townsend"
3 "Josh" "Mack"
4 "Ida" "Gutierrez"
5 "Dominick" "Morris"
6 "Virgil" "Beck"
7 "Francis" "Mills"
8 "Donna" "Malone"
9 "Renee" "Gross"
Person.EmailAddress
BusinessEntityID EmailAddress
1 "belinda.wood@email.com"
2 "david.townsend@email.com"
4 ""
5
6 "virgil.beck@email.com"
6 "virgil.b.beck@email.com"
7 "francis.mills@email.com"
8 "NULL"
What are the results of the following queries? Each question is worth up to 1 bonus point toward assignments. Q1) SELECT p.FirstName, p.LastName, ea.EmailAddress FROM Person.Person p LEFT OUTER JOIN Person.EmailAddress ea ON p.BusinessEntityID = ea.BusinessEntityID WHERE ea.EmailAddress LIKE NULL Q2) SELECT p.FirstName, p.LastName, ea.EmailAddress FROM Person.Person p INNER JOIN Person.EmailAddress ea ON p.BusinessEntityID = ea.BusinessEntityID WHERE ea.EmailAddress IS NULL Q3) SELECT p.FirstName, p.LastName, ea.EmailAddress FROM Person.Person p LEFT OUTER JOIN Person.EmailAddress ea ON p.BusinessEntityID = ea.BusinessEntityID WHERE ea.EmailAddress IS NULL Q4) SELECT p.FirstName, p.LastName, ea.EmailAddress FROM Person.Person p LEFT OUTER JOIN Person.EmailAddress ea ON p.BusinessEntityID = ea.BusinessEntityID AND ea.EmailAddress LIKE NULL Q5) SELECT p.FirstName, p.LastName, ea.EmailAddress FROM Person p LEFT OUTER JOIN EmailAddress ea ON p.BusinessEntityID = ea.BusinessEntityID
 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions