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
List layers of abstraction microsoft architectured to provide relational db through cloud platform ?
Do you know what is a linked server in sql server?
What are character string data types in ms sql server?
What are ddl (data definition language) statements for tables in ms sql server?
What is 'Join' and explain its various types.
Explain the rules for designing files and file groups in sql server?
What is a collation?
Explain security with sql azure?
What is scan table/view and seek table/view when its occurs? : sql server database administration
How extra digits are handled with numeric data type literals?
what is the system function to get the current user's user id? : Sql server database administration
Explain the creation and execution of a user-defined function in the sql server?
what are acid properties? : Sql server database administration
What is attribute hierarchy? : sql server analysis services, ssas
What is a constant or literal in ms sql server?