Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

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.

1827


If a stored procedure is taking a table data type, how it looks?

6348


What is the maximum size per database for sql server express?

970


Explain multiserver query

956


is it important for a database administrator to understand the operating system and file access? : Sql server administration

971


What is snapshot replication?

997


You want to implement the one-to-many relationship while designing tables. How would you do it?

908


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?

961


What are cascading parameters in ssrs reports?

212


what is package and it uses and how can u call a package

1948


explain the difference between oracle- sql and sql server sql ? if both are same y we r using 2 sw.s?

2423


What is dynamic cursor in SQL SERVER?

1000


What command must you use to include the not null constraint after a table has already been created?

1047


How to choose all records from the table?

997


How to create new databases with "create database" statements?

958