select top 5 * from emp order by newid()
my question is , how this query get executed?
Answer Posted / praveen n h
SQL server will execute the query in following way...
Select All top 5 rows which are created in the table from
the time it is created.
reason: newid is the key given to each row regardless of
the values that goes into the row of the table.
For example.
if you have created a table temp
and inserted 10 rows, Only fives rows which are created
first will be listed.
Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
Tell about MOM Tool(Microsoft Operator Manager)?
How can I create a report based on a query? : sql server management studio
What is a linked server in sql server?
What are wait types?
What is relationship? What number of sorts of relationship are there?
What stored by the model? : sql server database administration
Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture
Describe different Processing Modes offered by SSRS?
In which files does sql server actually store data?
What is a bit datatype?
What is difference between count (*) and count 1?
Is BCNF better than 2NF & 3NF? Why?
What are character string data types in ms sql server?
What are the different sql server versions?
what are the different types of SSRS reports?