Wednesday, 3 September 2014

How to generate random numbers in sql server


SELECT RandomNumber = CONVERT(VARCHAR,ABS(CHECKSUM(NEWID())))
FROM master.dbo.spt_values
ORDER BY RandomNumber

No comments:

Post a Comment