select top 5 * from emp order by newid()
my question is , how this query get executed?
Answer Posted / sanjeev kumar
newid() used with uniqueidentifier data types in a table
and uniqueidentifier datatype is used to insert randomly
new number, so the above query will give top 5 records in
randomly manner.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is deploy, process and build? : sql server analysis services, ssas
Can foreign key be deleted?
How can sql injection be stopped? : sql server security
What is sql server profiler trace data file?
When a primary key constraint is included in a table, what other constraints does this imply?
Can you use order by when defining a view?
How to search for a string in all stored procedure in sql server?
How to insert multiple rows with a subquery?
What is used to replicate sessions between instances in coldfusion clusters?
Explain about thread and memory management process of SQL?
How would you add a section to a table?
How to list all stored procedures in the current database using ms sql server?
What is a covering index?
where the connection string store in the database
Give an example of why you would want to denormalize a database