create or replace procedure proc_insert( vjh out char,jls out number)
as
begin
select jh into vjh from dde01;
select count(*) into jls from tszl_tsjcsj;
if (jls=0) then
insert into tszl_tsjcsj(jh) values(vjh);
end if;
end;
as
begin
select jh into vjh from dde01;
select count(*) into jls from tszl_tsjcsj;
if (jls=0) then
insert into tszl_tsjcsj(jh) values(vjh);
end if;
end;
create or replace procedure proc_insert
is
jls integer;
vjh varchar2(16);
begin
select jh into vjh from dde01;
select count(*) into jls from tszl_tsjcsj;
if (jls=0) then
insert into tszl_tsjcsj(jh) values(vjh);
commit;
end if;
end;
declare
job_id integer;
begin
dbms_job.submit(job_id,'proc_insert(''10'',''1'',''1'');',to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss'),'sysdate+12');
commit;
end;
declare
job_id integer;
begin
dbms_job.submit(job_id,'proc_insert(''10'',''1'',''1'');',to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss'),'sysdate+12');
commit;
end;
它是一个任务
在试图 user_jobs 中可以查询declare
job_id integer;
begin
dbms_job.submit(job_id,'proc_insert(''10'',''1'',''1'');',to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss'),'to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss')+1');
commit;
end;