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 / 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


Please Help Members By Posting Answers For Below Questions

What is deploy, process and build? : sql server analysis services, ssas

1156


Can foreign key be deleted?

979


How can sql injection be stopped? : sql server security

1104


What is sql server profiler trace data file?

1179


When a primary key constraint is included in a table, what other constraints does this imply?

1029


Can you use order by when defining a view?

1022


How to search for a string in all stored procedure in sql server?

1056


How to insert multiple rows with a subquery?

1193


What is used to replicate sessions between instances in coldfusion clusters?

1105


Explain about thread and memory management process of SQL?

1018


How would you add a section to a table?

1112


How to list all stored procedures in the current database using ms sql server?

1196


What is a covering index?

1043


where the connection string store in the database

2124


Give an example of why you would want to denormalize a database

1032