Answer:
No it will not execute and will give an error saying that:-
Msg 1033, Level 15, State 1, Procedure vw_test, Line 3
The order by clause is invalid in views,inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified.
Means we can not write order by clause until and unless Top clause is specified in Select statement.
Asked In: Many Interviews |
Alert Moderator