How does UNION work?
It returns all rows from the two queries, discarding duplicates.
SQL Server 70-461 04-02b to 04-03
What is the general format of two queries using UNION?
<qry1 Select Statement> UNION <qry2 Select Statement>
Just making a sentence long enough so the code will left justify for this flash card.
SQL Server 70-461 04-02b to 04-03
How is UNION ALL different from UNION?
It doesn’t elminate duplicates
SQL Server 70-461 04-02b to 04-03
If UNION and UNION ALL will return the same results, i.e. there are no duplicates, which should you use?
UNION ALL. UNION may attempt to eliminate duplicates, even though there aren’t any, and it could cause a performance issue.
SQL Server 70-461 04-02b to 04-03
How does INTERSECT work?
It returns only distinct rows that are common to both sets. If a row appears at least one time in the first set and one time in the second set it will be included one time in the result of the INTERSECT.
SQL Server 70-461 04-02b to 04-03
What is the general form of two queries using INTERSECT?
<qry1 Select Statement> INTERSECT <qry2 Select Statement>
Just making a sentence long enough so the code will left justify for this flash card.
SQL Server 70-461 04-02b to 04-03
What is the general form of two queries using EXCEPT?
<qry1 Select Statement> EXCEPT <qry2 Select Statement>
Just making a sentence long enough so the code will left justify for this flash card.
SQL Server 70-461 04-02b to 04-03
How would <qry1> UNION <qry2> INTERSECT <qry3> be evaluated?
SQL Server 70-461 04-02b to 04-03
What can you do to force precendence the way you want it to be for joins involving more than one set operator?
SQL Server 70-461 04-02b to 04-03
What are the three types of set operators?
SQL Server 70-461 04-02b to 04-03
What is the multi-set operator?
UNION ALL
SQL Server 70-461 04-02b to 04-03
How does EXCEPT work?
SQL Server 70-461 04-02b to 04-03
What four guidelines must you follow when working with set operators?
SQL Server 70-461 04-02b to 04-03
What is the order of precedence for set operators?
SQL Server 70-461 04-02b to 04-03