I need to insert random data in my database for testing, and would need to generate a numeric string (can start with 0) 27 characters long.
I've been looking into NEWID()
but it contains also letters, same for NEWSEQUENTIALID()
.
So far my approach would be to make a while loop, generate each digit randomly and concatenate it, but it seems to be a very slow approach.
I am using MSSQL 2014.