Name

RAND — Random number

Synopsis

RAND([min][|max])

Chooses a random number within a range.

RAND() randomly picks an integer between min and max, inclusive, and returns that integer. If min is not specified, it defaults to 0. If max is not specified, it defaults to the C constant INT_MAX, which is 2,147,483,647 on 32-bit platforms. Note that INT_MAX is quite a bit larger on 64-bit platforms.