oracle存储过程中使用变长一维数组

如题,oracle存储过程如何声明并调用变长一维数组,请贴代码,多谢~ 在线等
最新回答
———过客栈

2024-06-23 07:12:37

DECLARE
TYPE T_VARRY IS TABLE OF VARCHAR(20) INDEX BY BINARY_INTEGER;
V_VAR1 T_VARRY;
BEGIN
FOR I IN 1 .. 3 LOOP
V_VAR1(I) := 'this is ' || I || ';';
END LOOP;
FOR I IN 1 .. V_VAR1.COUNT LOOP
DBMS_OUTPUT.PUT_LINE(V_VAR1(I));
END LOOP;
END;
半袖桃花

2024-06-23 02:36:00

DECLARE
TYPE T_VARRY IS TABLE OF VARCHAR(20) INDEX BY BINARY_INTEGER;
V_VAR1 T_VARRY;
BEGIN
FOR I IN 1 .. 3 LOOP
V_VAR1(I) := 'this is ' || I || ';';
END LOOP;
FOR I IN 1 .. V_VAR1.COUNT LOOP
DBMS_OUTPUT.PUT_LINE(V_VAR1(I));
END LOOP;
END;
人家有伞,我有大头。

2024-06-23 02:54:10

。。