Oracle
 sql >> Datenbank >  >> RDS >> Oracle

Oracle Sql illegales Jahr

Kannst du das versuchen? Zufallsdatum generieren

 declare
 a date;
 begin                                                                                                                  
  --  for i in 1..5                                                                                                          
  --  loop                                                                                                                   
a  := trunc(sysdate + dbms_random.value(0,366)) ;                                   
 --end loop;
 dbms_output.put_line(a);  
end;                                                                                                                   
/                                                                                                                   

AUSFÜHRUNG:

SQL> @seq.sql                                                                                                               
20-MAY-16                                                                                                                   

PL/SQL procedure successfully completed.                                                                                    

SQL> @seq.sql                                                                                                               
10-NOV-15                                                                                                                   

PL/SQL procedure successfully completed.                                                                                    

SQL> @seq.sql                                                                                                               
09-JUN-15                                                                                                                   

PL/SQL procedure successfully completed.