set serveroutput on declare -- v_maxval number := 1000000; v_maxval number := 100; v_random number(1); begin for i in 1..v_maxval loop select TRUNC(dbms_random.value(0,2)) into v_random from dual; dbms_output.put_line (i || ' - ' || v_random); end loop; exception when others then dbms_output.put_line ('Fehler: ' || SQLCODE); end; /