日期:2014-05-16 浏览次数:20608 次
type type_char2 is table of NVARCHAR2(30) index by binary_integer; --定义一个字符串的临时表类型 v_card_id type_char2; --下面是游标 cursor cur_bt_data is select * from test....; --遍历游标 for bt_row in cur_bt_data loop for i in 1 .. bt_row.confirm_quanlity loop v_card_id(i) := to_number(bt_row.iccid_start)+i-1; end loop; forall i in 1 .. v_card_id.count insert /*+ append */ into demo (card_id,....) values (v_card_id(i),...); commit; end loop; -- [END]for 'cur_bt_data'
for bt_row in cur_bt_data loop v_card_id.delete; for i in 1 .. bt_row.confirm_quanlity loop ..........