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

newid() function return random row and top 5 return top 5
rows.
So query return top 5 row using random order.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can a database be repaired?

923


What is a partition function in sql server?

1023


how can you attach more than 20 ldf files in sql server

1948


What is the recovery model? List the types of recovery model available in sql server?

843


What do you mean by 'normalization'?

1003


What are the steps to take to improve performance of a poor performing query? : sql server database administration

978


Is it possible to update the views? If yes, how, if not, why?

969


What are the instances when triggers are appropriate?

926


How you can move data or databases between servers and databases in sql server?

1002


How to fetch the next row from a cursor with a "fetch" statement?

1016


Explain having clause and where clause?

989


Can sql servers linked to other servers?

972


What are difference between Cluster index and Non-Cluster index?

1020


Why SQL Agent is used?

1065


How to see the event list of an existing trigger using sys.trigger_events?

1024