Yes, we can use order by clause when defining a view.
The condition is we have to include either TOP or FOR XML clauses also in the query
create view gt as select * from emp order by ename
create view gt as select top 5 * from emp order by ename
Asked In: Many Interviews |