rand
<< *nvl | FB 2.0 Language Reference | right >>
rand
Library: ib_udf
Changed in: 2.0
Description
Returns a pseudo-random number. Before Firebird 2.0, this function would first seed the random number generator with the current time in seconds. Multiple rand()
calls within the same second would therefore return the same value. If you want that old behaviour in Firebird 2 and up, use the new function srand()
.
Result type: DOUBLE PRECISION
Syntax
rand ()
Declaration
DECLARE EXTERNAL FUNCTION rand RETURNS DOUBLE PRECISION BY VALUE ENTRY_POINT 'IB_UDF_rand' MODULE_NAME 'ib_udf'
back to top of page
<< *nvl | FB 2.0 Language Reference | right >>