RAND function [Numeric]

Function

Returns a double precision, random number x, where 0 <= x <1, with an optional seed.

Syntax

RAND ( [integer-expression] )

Parameters

integer-expression The optional seed used to create a random number. This argument allows you to create repeatable random number sequences.

Example

The following statement returns a value of approximately .941392926249216914.

SELECT RAND( 4 ) FROM iq_dummy

Standards and compatibility