36.
What is the data type of the target values column in the result of an UNPIVOT
operator?
- A.INT
- B.NVARCHAR(128)
- C.SQL_VARIANT
- D.The data type of the source columns that you unpivot
- Answer & Explanation
- Report
Answer : [D]
Explanation :
Explanation :
A. Incorrect: The type of the values column is not necessarily always an INT. B. Incorrect: The type of the values column is not necessarily always an NVARCHAR( 128)—that’s the case with the names column. C. Incorrect: The type of the values column is not SQL_VARIANT. D. Correct: The type of the values column is the same as the type of the columns that you unpivot, and therefore they must all have a common type. |
37.
What is the default frame window functions use when a window order clause is specified
but an explicit window frame clause isn’t? (Choose all that apply.)
- A.ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
- B.ROWS UNBOUNDED PRECEDING
- C.RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
- D.RANGE UNBOUNDED PRECEDING
- Answer & Explanation
- Report
Answer : [C, D]
Explanation :
Explanation :
A. Incorrect: The default frame is based on the RANGE unit. B. Incorrect: The default frame is based on the RANGE unit. C. Correct: This is the default frame. D. Correct: This is an abbreviated form of the default frame, having the same meaning. |
38.
What do the RANK and DENSE_RANK functions compute?
- A.The RANK function returns the number of rows that have a lower ordering value (assuming ascending ordering) than the current; the DENSE_RANK function returns the number of distinct ordering values that are lower than the current..
- B.The RANK function returns one more than the number of rows that have a lower ordering value than the current; the DENSE_RANK function returns one more than the number of distinct ordering values that are lower than the current
- C.The RANK function returns one less than the number of rows that have a lower ordering value than the current; the DENSE_RANK function returns one less than the number of distinct ordering values that are lower than the current.
- D.The two functions return the same result unless the ordering is unique.
- Answer & Explanation
- Report
Answer : [B]
Explanation :
Explanation :
A. Incorrect: These definitions are one less than the correct ones. B. Correct: These are the correct definitions. C. Incorrect: These definitions are two less than the correct ones. D. Incorrect: The opposite is true—the two functions return the same result when the ordering is unique. |
39.
Why are window functions allowed only in the SELECT and ORDER BY clauses of a
query?
- A.Because they are supposed to operate on the underlying query’s result, which is achieved when logical query processing gets to the SELECT phase.
- B.Because Microsoft didn’t have time to implement them in other clauses.
- C.Because you never need to filter or group data based on the result of window functions.
- D.Because in the other clauses, the functions are considered door functions (also known as backdoor functions).
- Answer & Explanation
- Report
Answer : [A]
Explanation :
Explanation :
A. Correct: Window functions are supposed to operate on the underlying query’s result
set. In terms of logical query processing, this result set is reached in the SELECT
phase. B. Incorrect: Standard SQL defines this restriction, so it has nothing to do with Microsoft’s time constraints. C. Incorrect: There are practical reasons to want to filter or group data based on the results of window functions. D. Incorrect: There are neither door functions nor backdoor functions in SQL. |
40.
Which full-text search elements can you use to prevent indexing noisy words? (Choose
all that apply.)
- A.Stopwords
- B.Thesaurus
- C.Stemmer
- D.Stoplists
- Answer & Explanation
- Report
Answer : [A, D]
Explanation :
Explanation :
A. Correct: Stopwords include noisy words. B. Incorrect: Thesaurus is used for synonyms. C. Incorrect: Stemmer is used for generating inflectional forms of words. D. Correct: You group stopwords in stoplists. |