select top 5 * from emp order by newid()

my question is , how this query get executed?

Answer Posted / kb

Random 5 rows are selected when newid() is used.

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different sql server versions?

519


You have to store user responses of ‘yes’ and ‘no’ what kind of data type is best suited for this task?

532


When a primary key constraint is included in a table, what other constraints does this imply?

603


What is difference between joins and subqueries?

537


What is use of attributehierarchyenabled? : sql server analysis services, ssas

612






How to list all login names on the ms sql server?

535


Can you explain important index characteristics?

526


Explain filestream storage of sql server 2008?

520


What is @@rowcount in sql?

565


How to provide login information for a new odbc dsn?

538


How will you optimize a stored procedure optimization?

517


Can we hide the definition of a stored procedure from a use?

653


How to backup encryption key ?

127


What is the use of sign function?

558


What is set nocount on and what is set nocount off?

515