Question: Consider a database which contains people and their respective residence histories: Which of the following queries will return all the people that have never lived
Consider a database which contains people and their respective residence histories:
Which of the following queries will return all the people that have never lived in Boston? Select all that apply.
SELECT p
FROM people p
JOIN residencehistory ON ppersonid rpersonid
WHERE rcity 'Boston'
SELECT p
FROM people p
LEFT JOIN residencehistory ON ppersonid rpersonid
WHERE rcity 'Boston'
SELECT p
FROM people p
WHERE NOT EXISTS
SELECT
FROM residencehistory
WHERE ppersonid rpersonid AND city 'Boston'
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
