8. SQL Statements : SET : Random_seed
 
Share this page                  
Random_seed
This statement sets the beginning value for the random functions. There is a global seed value and local seed values. The global value is used until you issue SET RANDOM_SEED, which changes the value of the local seed. Once changed, the local seed is used for the entire session. If you are using the global seed value, the seed is changed whenever a random function executes. This means that other users issuing random calls enhance the “randomness” of the returned value. The seed value can be any integer.
If you omit the value, the value is a multiple of the process ID and the number of seconds since 1/1/1970.