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
How to retrieve field values using mssql_result()?
Explain candidate key, alternate key, and composite key?
How to search for a string in all stored procedure in sql server?
What is the purpose of sql profiler in sql server?
in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration
What is a database in ms sql server?
Does sql server 2000 full-text search support clustering?
What are wait types?
When columns are added to existing tables, what do they initially contain?
What should be the fill factor for indexes created on tables? : sql server database administration
What is bcp? When does it use?
Why Master database is required?
What are audit control procedures?
Is sql server difficult to learn?
When is the use of update_statistics command?