Answered step by step
Verified Expert Solution
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
Person.EmailAddress
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started