Q&A

Q1: How are the columns referenced in the GROUP BY clause when using the GROUP BY clause with a compound query?
A1: The columns can be referenced by the actual column name or by the number of the column placement in the query if the column names are not identical in the two queries.
Q2: I understand what the EXCEPT operator does, but would the outcome change if I were to reverse the SELECT statements?
A2: Yes. The order of the individual queries is very important when using the EXCEPT or MINUS operator. Remember that all rows are returned from the first query that are not returned by the second query. Changing the order of the two individual queries in the compound query could definitely affect the results.
Q3: Must the data type and the length of columns in a compound query be the same in both queries?
A3: No. Only the data type must be the same. The length can differ.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset