實際上儲存過程向表中插入數636f7079e799bee5baa6e79fa5e9819331333337623432據和sql執行的區別是不大的,只不過是儲存過程是用loop等迴圈插入,之後順序執行sql語句,不用命令列執行。
CREATE OR REPLACE PROCEDURE insert_data_4_pressure_3
is
--Result1 VARCHAR2(50);
VAR_num number;
begin
VAR_num:=1;
while
VAR_num
LOOP
insert into rp_trans_log_day
(trans_time,
trans_province,
trans_type,
score_range,
rule_name,
trans_num)
select to_date("2013/10/29", "yyyy-mm-dd"),
round(dbms_random.value(1, 300)) || "省",
round(dbms_random.value(1, 800)) || "型別",
round(dbms_random.value(1, 100)) || "風險分值",
round(dbms_random.value(1, 300)) || "規則名稱",
"1"
from dual;
commit;
VAR_num:=VAR_num+1;
end loop;
end insert_data_4_pressure_3;
實際上儲存過程向表中插入數636f7079e799bee5baa6e79fa5e9819331333337623432據和sql執行的區別是不大的,只不過是儲存過程是用loop等迴圈插入,之後順序執行sql語句,不用命令列執行。
CREATE OR REPLACE PROCEDURE insert_data_4_pressure_3
is
--Result1 VARCHAR2(50);
VAR_num number;
begin
VAR_num:=1;
while
VAR_num
LOOP
insert into rp_trans_log_day
(trans_time,
trans_province,
trans_type,
score_range,
rule_name,
trans_num)
select to_date("2013/10/29", "yyyy-mm-dd"),
round(dbms_random.value(1, 300)) || "省",
round(dbms_random.value(1, 800)) || "型別",
round(dbms_random.value(1, 100)) || "風險分值",
round(dbms_random.value(1, 300)) || "規則名稱",
"1"
from dual;
commit;
VAR_num:=VAR_num+1;
end loop;
end insert_data_4_pressure_3;