Seed a random value with dbms_random.seed
SQL>
SQL> set serverout on
SQL> exec dbms_random.seed( to_char( sysdate, 'YYYYMMDD' ) );
PL/SQL procedure successfully completed.
SQL> exec dbms_output.put_line( dbms_random.value );
.09697957992149808336891757660029645577
PL/SQL procedure successfully completed.
SQL> exec dbms_output.put_line( dbms_random.value );
.07915501486927581930051571448998022468
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL> set serverout on
SQL> exec dbms_random.seed( to_char( sysdate, 'YYYYMMDD' ) );
PL/SQL procedure successfully completed.
SQL> exec dbms_output.put_line( dbms_random.value );
.09697957992149808336891757660029645577
PL/SQL procedure successfully completed.
SQL> exec dbms_output.put_line( dbms_random.value );
.07915501486927581930051571448998022468
PL/SQL procedure successfully completed.
SQL> --
Related examples in the same category