我对这个程序感到困惑请逐行解释任何一个,并且必须在forall循环中如何变量可以迭代那里
DECLARE
TYPE mysubs_type IS TABLE OF pls_integer INDEX BY pls_integer;
TYPE mylist_type IS TABLE OF pls_integer INDEX BY pls_integer;
mysubs mylist_type;
mylist mylist_type;
BEGIN
mylist(2) := 2;
mysubs(10) := 2; -- point to mylist(2)
mylist(3) := 3;
mysubs(200) := 3; -- point to mylist(3)
mylist(6) := 6;
mysubs(30) := 6; -- point to mylist(6)
mysubs(40) := 3; -- point to mylist(3)
FORALL i IN VALUES OF mysubs
INSERT INTO mynum_table(my_list) VALUES(mylist(i));
END;
答案 0 :(得分:0)
I
遍历bounds_clause
:IN VALUES OF
,表示i
是mysubs
的元素,并将在mysubs
中迭代集合mysubs
方式不连续。在这种情况下,在这种情况下4次。尊重2
6
3
3
的索引:
FORALL总是插入块:
{{1}}