I have 2 questions related to the package dbms_random in Oracle:
I wonder if there is a difference between initialize and seed in the dbms_random package. I have the need to randomize a fixed number of records from a larger set but I would like to have the records observed remain stable until I change the seed.
After reviewing the record, is there a way to generate a different set of records but still keep the seed, I wonder if there is a function to reset or reinitialize the package with the same seed?
Below is my sample code for illustration purpose. Can I generate a different set of records but still keep the original seed?
begin
--dbms_random.initialize(100);
dbms_random.seed(100);
SELECT *
FROM (
SELECT *
FROM table
ORDER BY DBMS_RANDOM.value)
WHERE rownum < 21;
end;