Which operator or operators should you use?

Posted by: Pdfprep Category: 70-461 Tags: , ,

DRAG DROP

You are a developer for a Microsoft SQL Server database. You need to write a stored procedure that performs several operations in the most efficient way possible.

Which operator or operators should you use? To answer, drag the appropriate operators to the correct operations. Each operator may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

Answer:

Explanation:

Box 1: UNION ALL

UNION combines the results of two or more queries into a single result set that includes all the rows that belong to all queries in the union.

UNION ALL Incorporates all rows into the results. This includes duplicates. If ALL is not specified, duplicate rows are removed.

Box 2: INTERSECT

INTERSECT returns distinct rows that are output by both the left and right input queries operator.

Box 3: INNER JOIN

The INNER JOIN keyword selects records that have matching values in both tables.

Box 4: MERGE

Merge performs insert, update, or delete operations on a target table based on the results of a join with a source table. For example, you can synchronize two tables by inserting, updating, or deleting rows in one table based on differences found in the other table.

Box 5: FULL OUTER JOIN

The FULL OUTER JOIN keyword return all records when there is a match in either left (table1) or right (table2) table records.

Note: FULL OUTER JOIN can potentially return very large result-sets!

Leave a Reply

Your email address will not be published.