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 are the dis_advantages of stored procedures, triggers, indexes?
where can you add custom error messages to sql server? : Sql server administration
What is SQL Azure Firewall?
Can a unique index be created on a column, which contains null?
What is the purpose of a table?
Will the writetext statement activate a trigger?
How to fetch the next row from a cursor with a "fetch" statement?
What are the different ways you can create databases in sql server?
explain different types of constraints? : Sql server database administration
What is sql server query analyzer?
Explain about remote stored procedure?
What is the main purpose of having conversation group?
What is store procedure? When do you use?
Explain the dirty pages?
Explain primary key and foreign key constraints?