Collections:
Create an Array in PL/SQL in Oracle
How To Create an Array in PL/SQL in Oracle?
✍: FYIcenter.com
If you want create an array data structure, you can use the collection type VARRAY. VARRAY stands for Variable Array. Here is a sample script on how to use VARRAY:
SQL> set serveroutput on;
SQL> DECLARE
2 TYPE list IS VARRAY(3) OF VARCHAR(16);
3 domain_list list;
4 BEGIN
5 domain_list := list('google','fyicenter','myspace');
6 DBMS_OUTPUT.PUT_LINE('Second domain: '
7 || domain_list(2));
8 END;
9 /
Second domain: fyicenter
As you can see, to define an array variable, you need to create your own array type, and use that type to define array variables.
⇒ Manage Transaction Isolation Levels in Oracle
⇐ Process Query Result in PL/SQL in Oracle
2019-03-08, 3120🔥, 0💬
Popular Posts:
What is test testing area for? The testing area is provided to allow visitors to post testing commen...
How To Generate CREATE VIEW Script on an Existing View in SQL Server? If you want to know how an exi...
How To Connect ASP Pages to Oracle Servers in Oracle? If you are running Windows IIS Web server and ...
Where to find tutorials to answer some frequently asked questions on Microsoft SQL Server Transact-S...
How To Verify a User name with SQLCMD Tool in SQL Server? The quickest way to verify a user name in ...