1. Create test table and serial number
[SQL] view plain copy print? CREATE TABLE Job_test (ID integer,add_time date);
SQL] View Plaincopyprint?
Create sequence seq_tm_id
MinValue 1
MaxValue 99999
Start with 61
Increment by 1
Cache 20; 2, the creation process
[SQL] view plain copy print? Create or replace procedure Prc_job_test is begin inserts into job_test values (Seq_tm_id.nextval, sysdate); Commit End Prc_job_test; 3. Create a task
[SQL] view plain copy print? declare tm_job number; Begin Sys.dbms_job.submit (Tm_job,--Task name ' prc_job_test; ',--the process of execution SYSD Ate,--Execution Time ' sysdate+1/(24*60*10) ');--Next execution time end; 4. View task ID
[SQL] view plain copy print? SELECT * from Dba_jobs; 5. Perform the task
[SQL] view plain copy print? Begin Dbms_job.run (41);--41 is the ID end of the task; 6, delete the task
[SQL] view plain copy print? Begin Dbms_job.remove (41); End