If you need a string of random digits up to 32 characters for test data or just need some junk text to fill a field, SQL Server's NEWID() function makes this simple. NEWID() is used to create a new GUID (globally unique identifier), and we can use that as a base to get a string of random characters.
SELECT NewID() AS [NewID]
This gives you a 36 character string, but four of the characters are dashes. To remove these, we can simply run
SELECT REPLACE(NEWID(),'-','') AS Random32
which gives us 32 random characters. You can use the left (or right) functions to grab however many characters you need...
SELECT LEFT(REPLACE(NEWID(),'-',''),10) AS Random10
...then convert it to whatever data type you are working with...
(e.g.)
SELECT CONVERT(nvarchar(10),LEFT(REPLACE(NEWID(),'-',''),10))
...and you are good to go! Each time you run the select, you will get a different 10 digit sequence numbers and letters.
Resources