1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
Connected as mni
SQL>
SQL> set serveroutput on
SQL> Create Table t_retard (
2 id integer primary key,
3 some_col varchar2(10)
4 )
5 /
Table created
SQL> Create Or Replace Procedure Do_Nothing
2 Is
3 Begin
4 Null;
5 End;
6 /
Procedure created
SQL> Create Or Replace Trigger ai_t_retard
2 After Insert On t_retard
3 For Each Row
4 Declare
5 l_job_id binary_integer;
6 Begin
7 dbms_job.submit(
8 job => l_job_id,
9 what => 'Do_Nothing;',
10 next_date => sysdate + TO_DSINTERVAL('0 00:01:00')
11 );
12 --
13 Dbms_Output.put_line('Job_id ='||To_Char(l_job_id));
14 End;
15 /
Trigger created
SQL> Insert Into t_retard
2 Values (1, 'A TEST')
3 /
Job_id =3
1 row inserted
SQL> Commit
2 /
Commit complete
SQL> |
Partager