Tuesday, November 16, 2010

Select Random Percent of Data in SQL

This can be achieved by using newid() function
Example
select TOP 20 PERCENT FirstName from dim_customer
order by newid()

No comments: