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
i have made a project i vb.net n created a .exe of it after installing it in to any pc, the database (sql express) is not geting accesed i.e the aplication cuts the link of the database, so plz help in this matter.
If a stored procedure is taking a table data type, how it looks?
What is the maximum size per database for sql server express?
Explain multiserver query
is it important for a database administrator to understand the operating system and file access? : Sql server administration
What is snapshot replication?
You want to implement the one-to-many relationship while designing tables. How would you do it?
Beginning with sql server version 7 0, a new enhanced data type nchar was added what type of data is supported with this data type?
What are cascading parameters in ssrs reports?
what is package and it uses and how can u call a package
explain the difference between oracle- sql and sql server sql ? if both are same y we r using 2 sw.s?
What is dynamic cursor in SQL SERVER?
What command must you use to include the not null constraint after a table has already been created?
How to choose all records from the table?
How to create new databases with "create database" statements?