转载自:https://www.cnblogs.com/Chestnuts/articles/7066333.html
oracle中的job能为你做的就是在你规定的时间格式里执行存储过程,定时执行一个任务 。下面是一个小案例,定时每15分钟向一张表插入一条数据
一
1.创建一张测试表
--Create table
create tableA8
(
a1VARCHAR2(500)
)
tablespace DSP_DATA
pctfree10initrans1maxtrans255storage
(
initial 64Knext1M
minextents1maxextents unlimited
);
2.创建存储过程 实现向测试表插入数据
create or replace procedure proc_add_test as
begin
insert into a8 values (to_char(sysdate, 'yyyy-mm-dd hh:mi'));/*向测试表插入数据*/
<