日期:2014-05-17 浏览次数:20802 次
CREATE OR REPLACE PROCEDURE prc_pm_cpu(in_portid integer, in_stime date, in_etime date) is v_value number; v_mincpuused number; v_maxcpuused number; begin begin select t.cpuused into v_mincpuused from s_pm_cpu t where t.portid = in_portid and t.starttime=in_stime; select t.cpuused into v_maxcpuused from s_pm_cpu t where t.portid = in_portid and t.starttime=in_etime; v_value:=v_maxcpuused-v_mincpuused; end; commit; end prc_pm_cpu;