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

How to retrieve field values using mssql_result()?

1183


Explain candidate key, alternate key, and composite key?

938


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

949


What is the purpose of sql profiler in sql server?

959


in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration

1005


What is a database in ms sql server?

991


Does sql server 2000 full-text search support clustering?

813


What are wait types?

1014


When columns are added to existing tables, what do they initially contain?

975


What should be the fill factor for indexes created on tables? : sql server database administration

1098


What is bcp? When does it use?

869


Why Master database is required?

1057


What are audit control procedures?

939


Is sql server difficult to learn?

862


When is the use of update_statistics command?

949