oracle存储过程中使用变长一维数组
3个回答
展开全部
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;
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;
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
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;
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;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2012-06-11
展开全部
。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询