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
Data table as parameter in sql server?
Write the syntax for stuff function in an sql server?
How to truncate the log in sql server 2012? : sql server database administration
What is built-in function?
What is a subquery in a select query statement in ms sql server?
How many types of subqueries are there in sql server?
According to you what goes into making the best database administrator? : sql server database administration
What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?
You have modified 100 store procedures and want to replicate these changes from development to prodution, and production can have users using the Server/DB, how would you replicate without causing issues?
explain what is raid and what are different types of raid configurations? : Sql server database administration
What is the sql server 2000 version number?
What options are available to audit login activity? : sql server security
What is indexing in sql server with example?
Is it possible in sql table to have more than one foreign key?
Are null values the same as that of zero or a blank space?