Returns a random number.

Syntax

RANDOM ()

Returns

A DOUBLE value between 0 and 1, exclusive. The returned value is different for each execution of the function.

Examples

SELECT firstName, RANDOM() AS randomNumber FROM MYSQL.inventory.cust;

VALUES RANDOM();
-- Return value differs with each execution.