create or replace procedure sp_test as
title1_value varchar2(30);
number1_value integer:=0;
cursor c_1 is select city_name,count(city_name) from view_alarm_kz1 group by city_name;
begin
open c_1;
loop
fetch c_1 into title1_value,number1_value;
exit when c_1%notfound;
insert into tfa_alarm_counter_kz(title1,collection_time,kz1) values(title1_value,sysdate,number1_value);
end loop;
close c_1;
commit;
exception
when others then
rollback;
end;
oracle儲存過程,游標
oracle儲存過程,游標 2010 07 07 13 01 create or replace procedure p tb task log is 功能 插入任務到任務日誌表 v task start date date v task end date date v sql code numbe...
oracle 儲存過程 游標
create or replace procedure exception3 as 使用者自定義異常 e too high sal exception 宣告自定義異常 v sal employees.salary type begin select salary into v sal from em...
oracle儲存過程 游標篇
oracle 中cursor用於遍歷臨時表中的查詢結果 1 cursor 型游標 不能用於引數傳遞 create or replace procedure test is cusor 1 cursor is select std name from student where cursor 的使用方...