Which Transact-SQL query or queries should you use?

You administer a Microsoft SQL Server database that supports a banking transaction
management application.
You need to retrieve a list of account holders who live in cities that do not have a branch
location.
Which Transact-SQL query or queries should you use? (Each correct answer presents a
complete solution. Choose all that apply.)

You administer a Microsoft SQL Server database that supports a banking transaction
management application.
You need to retrieve a list of account holders who live in cities that do not have a branch
location.
Which Transact-SQL query or queries should you use? (Each correct answer presents a
complete solution. Choose all that apply.)

A.
SELECT AccountHolderID
FROM AccountHolder
WHERE CityID NOT IN (SELECT CityID FROM BranchMaster)

B.
SELECT AccountHolderID
FROM AccountHolder
WHERE CityID <> ALL (SELECT CityID FROM BranchMaster)

C.
SELECT AccountHolderlD
FROM AccountHolder
WHERE CityID <> SOME (SELECT CityID FROM BranchMaster)

D.
SELECT AccountHolderID
FROM AccountHolder
WHERE CityID <> ANY (SELECT CityID FROM BranchMaster)

Explanation:
Verified the answers as correct.
Reference:
http://msdn.microsoft.com/en-us/library/ms188047.aspx
Reference:
http://msdn.microsoft.com/en-us/library/ms177682.aspx
Reference:
http://msdn.microsoft.com/en-us/library/ms173545.aspx



Leave a Reply 3

Your email address will not be published. Required fields are marked *


chicco

chicco

Correct. SOME and ANY are equivalent, so C and D are wrong answers.

malsa001

malsa001

The answers are C & D. Answer A cannot is not correct as it is misspelled.

scotrideff

scotrideff

Answer IS A and only A