How to fetch Random Rows in Sql Server?

 Posted by vishalneeraj-24503 on 10/7/2014 | Category: Sql Server Interview questions | Views: 1008 | Points: 40

We can use NewID() in-built Sql Server function to fetch Random Rows.We have to give it after Order by clause,then it will populate random rows each time query is hit.

For Example:-
select * from employee_master order by newid();

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response