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 are different types of schemas?

924


How to use values from other tables in update statements in ms sql server?

1090


Explain the rules for designing files and file groups in sql server?

964


What is stored procedures?

1000


Which rendering formats are affected by the pagesize properties?

144


Do you know the isolation level that sql server support?

947


What is sqlcmd?

1020


What is a derived table?

907


What is the difference between a function and a stored procedure?

1047


What structure can you implement for the database to speed up table reads?

1179


How to concatenate two binary strings together?

1088


What is logshipping and its purpose?

973


What are the events recorded in a transaction log?

978


Do you know concepts and capabilities of sql server?

1038


Write a SQL query to make a column as unique?

1009