1、-- Create table
create table TEST
(
TEST DATE
)tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
2、-- Create procedure
create or replace procedure pro_test
AS
carinfo_id number;
BEGIN
insert into test values(SYSDATE);
commit;
end pro_test;
VARIABLE jobno number;
begin
DBMS_JOB.SUBMIT(:jobno,'pro_test;',SYSDATE,'sysdate+1/24/12');
commit;
end;
/
-- Create 作业 每隔10秒执行一次
VARIABLE jobno number;
begin
DBMS_JOB.SUBMIT(:jobno,'pro_test;',SYSDATE,'sysdate+1/24/60/10');
commit;
end;
/
create table TEST
(
TEST DATE
)tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
2、-- Create procedure
create or replace procedure pro_test
AS
carinfo_id number;
BEGIN
insert into test values(SYSDATE);
commit;
end pro_test;
VARIABLE jobno number;
begin
DBMS_JOB.SUBMIT(:jobno,'pro_test;',SYSDATE,'sysdate+1/24/12');
commit;
end;
/
-- Create 作业 每隔10秒执行一次
VARIABLE jobno number;
begin
DBMS_JOB.SUBMIT(:jobno,'pro_test;',SYSDATE,'sysdate+1/24/60/10');
commit;
end;
/