rand
<< pi | FB 2.5 Language Reference | right >>
<< pi | FB 2.1 Language Reference | right >>
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'
back to top of page
<< pi | FB 2.5 Language Reference | right >>
<< pi | FB 2.1 Language Reference | right >>