create or replace procedure prohistoryData(startTime in VARCHAR2,endTime in VARCHAR2) is
begin
delete DEVICE_HISTORY where TO_CHAR(COLLECTTIME,'YYYY-MM-DD HH24:MI:SS') between startTime and endTime;
delete SPAN_HISTORY where TO_CHAR(COLLECTTIME,'YYYY-MM-DD HH24:MI:SS') between startTime and endTime;
delete STRAIN_HISTORY where TO_CHAR(COLLECTTIME,'YYYY-MM-DD HH24:MI:SS') between startTime and endTime;
delete CAPACITY_HISTORY where TO_CHAR(COLLECTTIME,'YYYY-MM-DD HH24:MI:SS') between startTime and endTime;
end prohistoryData;
调用方法
exec prohistorydata(startTime='2010-01-01',endTime='2010-12-30');
调用方法在命令提示行运行,记得commit 提交操作
经验总结
Procedures -->prohistoryData -->(text or 测试)
进入另一页面
表格里填参数
如果存储过程写法有问题,过程是一把叉 ,红色警告,点击调试看错误