How to generate random numbers in sql server


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

Comments

Popular posts from this blog

List of special Characters in HTML

Get Random alphanumeric number with specific length using SQL Server