创建测试表
create table TEST
(
TIME DATE
);
创建过程
create or replace procedure test_time as
begin
insert into test values ( sysdate );
end;
/
创建Job
variable jobnum number;
begin
sys.dbms_job.submit(job => :jobnum,
what => 'test_time;',
next_date => to_date('11-03-2010 11:43:46', 'dd-mm-yyyy hh24:mi:ss'),
interval => 'sysdate+1/2880');
commit;
end;
/
查询验证
select count(*) from test;
创建测试表
create table test_tab
(
time date
);
创建过程
create or replace procedure test_pro as
begin
insert into test_tab values ( sysdate );
end;
/
创建Job
variable job_num number;
begin
sys.dbms_job.submit( job=> :job_num,what=>'test_pro;',next_date=>to_date('2010-3-11 14:24:00','yyyy-mm-dd hh24:mi:ss'),interval=>'sysdate+1/2880');
commit;
end;
/
查询验证
select count(*) from test_tab;
间隔一分钟
select count(*) from test_tab;
阅读(1098) | 评论(0) | 转发(0) |