RAND

 

The function RAND returns a random number in the range of 0.0 to 1.0. If you does not use a seek the value is completely random.

SQL Syntax 1:
 
   RAND( seed )
SQL Syntax 2:
 
   RAND()
Seed:
 
  Any INT expression.
Escape Syntax:
 
  {fn RAND( number )}
Return Type:
 
  FLOAT
     

Examples:

  • SELECT RAND(4), {fn rand(0)}

    Returns: 0.7306094602878371, 0.730967787376657

see also:
SQL Numeric Functions


100% pure Java DBMS
Mirror Site