we use rand function in sql server to generate random number
* RAND(seed) - Starting a new sequence of random numbers based on the given integer "seed" and returning the first random number in FLOAT(53) from the sequence. * RAND() - Returning the next random number in FLOAT(53) from the current sequence. If there has been no current sequence, SQL Server will start a new sequence with a random "seed".
for example: SELECT RAND(100);
Liked By
Write Answer
how to use function to generate rand number in mssql server?
Join MindStick Community
You have need login or register for voting of answers or question.
Amit Singh
09-Nov-2010* RAND(seed) - Starting a new sequence of random numbers based on the given integer "seed" and returning the first random number in FLOAT(53) from the sequence.
* RAND() - Returning the next random number in FLOAT(53) from the current sequence. If there has been no current sequence, SQL Server will start a new sequence with a random "seed".
for example:
SELECT RAND(100);