In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "how to use array in oracle". The content is simple and easy to understand, and the organization is clear. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn "how to use array in oracle" this article.
An example of a one-dimensional array is as follows:
-- Created on 2014-5-15 by ADMINISTRATORDECLARE TYPE Arr1 IS VARRAY(10) OF NUMBER; Tab_1 Arr1; TYPE Arr2 IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; Tab_2 Arr2;BEGIN -- Test statements here Tab_1 := Arr1(1, 3, 4, 6, 3, 2, 8, 5); FOR a IN 1 .. Tab_1.Count LOOP Dbms_Output.Put_Line(' ' || Tab_1(a)); END LOOP; Tab_2(1) := 101; Tab_2(2) := 102; Tab_2(3) := 103; Tab_2(4) := 104; FOR b IN 1 .. Tab_2.Count LOOP Dbms_Output.Put_Line(' ' || Tab_2(b)); END LOOP;END;
Results:
13463285101102103104
Example of a two-dimensional array:
-- Created on 2014-5-15 by ADMINISTRATORDECLARE -- Local variables here TYPE Array1 IS VARRAY(10) OF NUMBER; TYPE Array2 IS VARRAY(10) OF Array1; Arr Array2;BEGIN Arr := Array2(Array1(11, 12, 13, 14, 15), Array1(21, 22, 23, 24, 25)); FOR i IN 1 .. Arr.Count LOOP FOR j IN 1 .. Arr(i).Count LOOP Dbms_Output.Put_Line(Arr(i) (j)); END LOOP; END LOOP;END;
Results:
11121314152122232425 The above is "oracle array how to use" all the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.