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 are different types of schemas?
How to use values from other tables in update statements in ms sql server?
Explain the rules for designing files and file groups in sql server?
What is stored procedures?
Which rendering formats are affected by the pagesize properties?
Do you know the isolation level that sql server support?
What is sqlcmd?
What is a derived table?
What is the difference between a function and a stored procedure?
What structure can you implement for the database to speed up table reads?
How to concatenate two binary strings together?
What is logshipping and its purpose?
What are the events recorded in a transaction log?
Do you know concepts and capabilities of sql server?
Write a SQL query to make a column as unique?