Firebird Documentation Index → Firebird 2.5 Language Ref. Update → External functions (UDFs) → rand |
Library: ib_udf
Changed in: 2.0
Better alternative: Internal function RAND()
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 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'
Firebird Documentation Index → Firebird 2.5 Language Ref. Update → External functions (UDFs) → rand |