select top 5 * from emp order by newid()
my question is , how this query get executed?
Answer Posted / anil sharma
newid() function return random row and top 5 return top 5
rows.
So query return top 5 row using random order.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is a benefit of using an after insert trigger over using a before insert trigger?
What is a matrix in ssrs?
What are the kinds of subquery?
what is new philosophy for database devises for sql server 7.0? : Sql server database administration
What is the simplest way to create a new database in ms sql server?
What is sql server management studio? : sql server management studio
Differentiate between sql temp table vs table variable?
What are the difference between “where” and “having” clause in sql server?
What is scan table/view and seek table/view when its occurs? : sql server database administration
What is the difference between resultset and resultsetmetadata?
Can we use pragma autonomous_transaction in trigger?
Is foreign key unique?
What are the disadvantages of indexes?
What are the two authentication modes in sql server?
Where actually sql azure database is hosted?