how to use function to generate rand number in mssql server?
Ask by Amit Singh
Updated 20 Sep 2020
* 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);