You are a database administrator for AIOTestKing.com. You administer a SQL Server 2005 computer. Customers send orders to your company over the Internet in an XML format.
The XML is submitted as an input argument of a stored procedure. The stored procedure needs to produce a result set that includes all invalid product identification numbers (IDs) from the order. A company database contains a list of all valid product IDs. You need to ensure that the stored procedure can produce the desired result set. Your solution must provide the fastest possible query performance. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A.
Write an OUTER JOIN query that includes a WHERE clause.Write the WHERE clause to remove valid product IDs.
B.
Write a query that uses a NOT EXISTS() subquery.
C.
Write a CROSS JOIN query that includes a WHERE clause.Write the WHERE clause to remove valid product IDs.
D.
Write a query that uses the HASH JOIN query hint.
Explanation:
An OUTER JOIN would produce a list of ID’s in the XML order but not in the company database over valid ID’s, a NOT EXISTS() subquery would give the same result.