1.

Which of the following error message will be displayed if ORDER CLAUSE is not mentioned in ROW NUMBER function?(a) “The ranking function “ROW_NUMBER” must have an ORDER BY clause.”(b) “The ranking function “ROW_NUMBER” must have an OVER BY clause.”(c) “The ranking function “ROW_NUMBER” must have an PARTITION BY clause.”(d) All of the mentionedThis question was addressed to me during an interview.My question is from Ranking in chapter Manipulating Data with Select of SQL Server

Answer»

Correct ANSWER is (a) “The ranking FUNCTION “ROW_NUMBER” must have an ORDER BY CLAUSE.”

Explanation: ORDER BY CLAUSE is not OPTIONAL clause in ROW NUMBER function.



Discussion

No Comment Found

Related InterviewSolutions