{"id":17173,"date":"2020-10-11T12:25:47","date_gmt":"2020-10-11T12:25:47","guid":{"rendered":"https:\/\/dbtut.com\/?p=17173"},"modified":"2020-10-11T15:27:55","modified_gmt":"2020-10-11T15:27:55","slug":"oracle-pl-sql-collections","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/","title":{"rendered":"Oracle PL\/SQL Collections"},"content":{"rendered":"<p>This article contains information about Oracle PL\/SQL Collections, types such as Associative Array, Nested Table and Varray, also collection methods.<\/p>\n<h3>What is Collection Oracle?<\/h3>\n<p>Collections are data types where values with a similar data type are stored and the capacity of the variables grows dynamically.<\/p>\n<h3>Why do we use collections in Oracle?<\/h3>\n<p>Collections are used to store data of the same data type in a variable, such as arrays contained in PL \/ SQL.<\/p>\n<p>The difference of the collections from the arrays is that their dimensions can be changed when new elements are added or requested.<\/p>\n<h3>Collection Types in Oracle PL\/SQL<\/h3>\n<p>There are 3 types of PL \/ SQL collection structures.<\/p>\n<ul>\n<li>Associative (Index-By Table)<\/li>\n<li>Nested Table<\/li>\n<li>Varray<\/li>\n<\/ul>\n<h3>Associative Array in Oracle PL\/SQL with Example<\/h3>\n<p>A collection type that stores data as a key-value pair.<\/p>\n<p>The collection size increases as data is added. Associative Array definition is as follows.<\/p>\n<pre class=\"lang:default decode:true\">TYPE array_name IS TABLE OF value_data_type [NOT NULL] INDEX BY key_data_type;<\/pre>\n<p>Sample Associative Array usage is as follows.<\/p>\n<pre class=\"lang:default decode:true\">DECLARE\r\n    TYPE PERSON_LIST IS TABLE OF NUMBER INDEX BY VARCHAR2(20);\r\n    PERSON PERSON_LIST;\r\n    PERSON_NAME VARCHAR2(20);\r\nBEGIN\r\n    PERSON('Yusuf') := 123;\r\n    PERSON('Ramazan') := 456;\r\n    PERSON('Sinan') := 789;\r\n    PERSON('Mehmet') := 987;\r\n\r\n    PERSON_NAME := PERSON.FIRST;\r\n    WHILE PERSON_NAME IS NOT NULL LOOP\r\n        DBMS_OUTPUT.put_line(PERSON_NAME || ' - ' || PERSON(PERSON_NAME));\r\n        PERSON_NAME := PERSON.NEXT(PERSON_NAME);\r\n    END LOOP; \r\nEND;<\/pre>\n<p>If you want to make the key value a numerical value, a numeric data type such as PLS_INTEGER, NUMBER can be specified instead of VARCHAR2 (20).<\/p>\n<h3>Nested Table in Oracle PL\/SQL with Example<\/h3>\n<p>It is a type of collection that allows us to store data as in arrays.<\/p>\n<p>The most important feature that distinguishes this collection from the arrays is that its capacity can be increased.<\/p>\n<pre class=\"lang:default decode:true\">TYPE array_name IS TABLE OF value_data_type [NOT NULL]<\/pre>\n<p>Unlike the Associative Array type, INDEX BY cannot be used.<\/p>\n<pre class=\"lang:default decode:true\">DECLARE\r\n    TYPE PERSON_LIST IS TABLE OF VARCHAR2(20);\r\n    PERSON PERSON_LIST;\r\n    PERSON_COUNT PLS_INTEGER;\r\nBEGIN\r\n    PERSON := PERSON_LIST('Yusuf', 'Ramazan', 'Sinan', 'Ramazan');\r\n\r\n    PERSON_COUNT := PERSON.COUNT;\r\n    FOR I IN 1 .. PERSON_COUNT LOOP\r\n        DBMS_OUTPUT.put_line(I || ' - ' || PERSON(I));\r\n    END LOOP;\r\nEND;<\/pre>\n<p>Adding value to the collection is done by expanding the collection with EXTEND method.<\/p>\n<pre class=\"lang:default decode:true\">DECLARE\r\n    TYPE PERSON_LIST IS TABLE OF VARCHAR2(20);\r\n    PERSON PERSON_LIST;\r\n    PERSON_COUNT PLS_INTEGER;\r\nBEGIN\r\n    PERSON := PERSON_LIST('Yusuf', 'Ramazan', 'Sinan', 'Ramazan');\r\n\r\n    PERSON.EXTEND;\r\n    PERSON(PERSON.COUNT) := 'New value added.';\r\n\r\n    PERSON_COUNT := PERSON.COUNT;\r\n    FOR I IN 1 .. PERSON_COUNT LOOP\r\n        DBMS_OUTPUT.put_line(I || ' - ' || PERSON(I));\r\n    END LOOP;\r\nEND;<\/pre>\n<h3>Varray in Oracle PL\/SQL with Example<\/h3>\n<p>Arrays in many programming languages \u200b\u200bare also available in PL\/SQL.<\/p>\n<p>Unlike other programming languages, PL \/ SQL arrays start from 1. Array definition is as follows.<\/p>\n<pre class=\"lang:default decode:true\">CREATE OR REPLACE TYPE array_name IS VARRAY(array_dimension) OF array_data_type<\/pre>\n<pre class=\"lang:default decode:true\">TYPE array_name IS VARRAY(array_dimension) OF array_data_type<\/pre>\n<p>Sample array usage is as follows.<\/p>\n<pre class=\"lang:default decode:true\">SET SERVEROUTPUT ON;\r\nDECLARE\r\n    TYPE PERSON IS VARRAY(4) OF VARCHAR2(20);\r\n    MYLIST PERSON;\r\n    PERSON_COUNT PLS_INTEGER := 0;\r\nBEGIN\r\n    MYLIST := PERSON('Yusuf', 'Ramazan', 'Sinan', 'Mehmet');\r\n    PERSON_COUNT := MYLIST.COUNT;\r\n\r\n    FOR i IN 1..PERSON_COUNT LOOP\r\n        DBMS_OUTPUT.put_line(MYLIST(i));\r\n    END LOOP;\r\n\r\nEND;<\/pre>\n<h3>Collection Methods in Oracle PL\/SQL<\/h3>\n<p>There are several methods for using collections flexibly.<\/p>\n<p><strong>EXISTS (n):<\/strong> Checks if the specified element exists in the collection.<\/p>\n<p><strong>COUNT:<\/strong> Returns the number of elements in the collection.<\/p>\n<p><strong>LIMIT:<\/strong> Returns the collection capacity.<\/p>\n<p><strong>FIRST:<\/strong> Returns the first index value in the collection.<\/p>\n<p><strong>LAST:<\/strong> Returns the last index value in the collection.<\/p>\n<p><strong>PRIOR (n):<\/strong> Returns the sequence number before n.<\/p>\n<p><strong>NEXT (n):<\/strong> Returns the sequence number after n.<\/p>\n<p><strong>EXTEND:<\/strong> Extends the collection by appending a single null element to the collection.<\/p>\n<p><strong>EXTEND (n):<\/strong> Extends the collection by appending n single null element to the collection.<\/p>\n<p><strong>EXTEND (n1, n2):<\/strong> Extends the collection by appending n1 copies of the n2th element to the collection.<\/p>\n<p><strong>TRIM:<\/strong> Removes the last element in the collection.<\/p>\n<p><strong>TRIM (n):<\/strong> Removes elements as much as n from the end of the collection.<\/p>\n<p><strong>DELETE:<\/strong> Removes all elements from the collection.<\/p>\n<p><strong>DELETE (n):<\/strong> Removes element n from the collection.<\/p>\n<p><strong>DELETE (n1, n2):<\/strong> Removes all elements from n1 to n2 from the collection.<\/p>\n<p>You can find more detailed information about below topics in the below link.<\/p>\n<p><strong><a href=\"https:\/\/dbtut.com\/index.php\/2020\/03\/19\/pl-sql-tutorial\/\" target=\"_blank\" rel=\"noopener noreferrer\">PL\/SQL Tutorial<\/a><\/strong><\/p>\n<p>You will find below topics in this article.<\/p>\n<ol>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/what-is-pl-sql\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>What is PL\/SQL<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-data-types-and-variables-and-literals\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Data Types and Variables and Literals<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-operators\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Operators<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-conditional-statements\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Conditional Statements<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-loops\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Loops<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-procedures-and-procedure-parameters\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Procedures and Procedure Parameters<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-functions\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Functions<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-cursor\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Cursor<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-records\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Records<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-exception\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Exception<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-trigger\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Trigger<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-packages\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Packages<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Oracle PL\/SQL Collections<\/strong><\/a><\/li>\n<\/ol>\n<p>You can find more information about collections at <a href=\"https:\/\/docs.oracle.com\/cd\/B28359_01\/appdev.111\/b28370\/collections.htm#LNPLS005\" target=\"_blank\" rel=\"noopener noreferrer\">docs.oracle.com<\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_17173\" class=\"pvc_stats all  \" data-element-id=\"17173\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This article contains information about Oracle PL\/SQL Collections, types such as Associative Array, Nested Table and Varray, also collection methods. What is Collection Oracle? Collections are data types where values with a similar data type are stored and the capacity of the variables grows dynamically. Why do we use collections in Oracle? Collections are used &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_17173\" class=\"pvc_stats all  \" data-element-id=\"17173\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":485,"featured_media":17174,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[4],"tags":[10121,10122,10126,9329,10120,10123,10125,10124,10118,10119],"class_list":["post-17173","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-oracle","tag-associative-array-in-oracle-pl-sql","tag-associative-array-in-oracle-pl-sql-with-example","tag-collection-methods-in-oracle-pl-sql","tag-collection-methods-in-pl-sql","tag-collection-types-in-oracle-pl-sql","tag-nested-table-in-oracle-pl-sql","tag-varray-in-oracle-pl-sql","tag-varray-in-oracle-pl-sql-with-example","tag-what-is-collection-oracle","tag-why-do-we-use-collections-in-oracle"],"aioseo_notices":[],"a3_pvc":{"activated":true,"total_views":535,"today_views":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Oracle PL\/SQL Collections - Database Tutorials<\/title>\n<meta name=\"description\" content=\"Contains information about Oracle PL\/SQL Collections, types such as Associative Array,Nested Table,Varray, also collection methods.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle PL\/SQL Collections - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"Contains information about Oracle PL\/SQL Collections, types such as Associative Array,Nested Table,Varray, also collection methods.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-11T12:25:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-10-11T15:27:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/10\/plsqlcollections.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"829\" \/>\n\t<meta property=\"og:image:height\" content=\"520\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Yusuf SEZER\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yusuf SEZER\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/\"},\"author\":{\"name\":\"Yusuf SEZER\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a\"},\"headline\":\"Oracle PL\/SQL Collections\",\"datePublished\":\"2020-10-11T12:25:47+00:00\",\"dateModified\":\"2020-10-11T15:27:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/\"},\"wordCount\":552,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/10\/plsqlcollections.jpg\",\"keywords\":[\"Associative Array in Oracle PL\/SQL\",\"Associative Array in Oracle PL\/SQL with Example\",\"Collection Methods in Oracle PL\/SQL\",\"Collection Methods in PL\/SQL\",\"Collection Types in Oracle PL\/SQL\",\"Nested Table in Oracle PL\/SQL\",\"Varray in Oracle PL\/SQL\",\"Varray in Oracle PL\/SQL with Example\",\"What is Collection Oracle?\",\"Why do we use collections in Oracle?\"],\"articleSection\":[\"ORACLE\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/\",\"name\":\"Oracle PL\/SQL Collections - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/10\/plsqlcollections.jpg\",\"datePublished\":\"2020-10-11T12:25:47+00:00\",\"dateModified\":\"2020-10-11T15:27:55+00:00\",\"description\":\"Contains information about Oracle PL\/SQL Collections, types such as Associative Array,Nested Table,Varray, also collection methods.\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/10\/plsqlcollections.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/10\/plsqlcollections.jpg\",\"width\":829,\"height\":520},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle PL\/SQL Collections\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a\",\"name\":\"Yusuf SEZER\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g\",\"caption\":\"Yusuf SEZER\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/yusufsezer\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Oracle PL\/SQL Collections - Database Tutorials","description":"Contains information about Oracle PL\/SQL Collections, types such as Associative Array,Nested Table,Varray, also collection methods.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/","og_locale":"en_US","og_type":"article","og_title":"Oracle PL\/SQL Collections - Database Tutorials","og_description":"Contains information about Oracle PL\/SQL Collections, types such as Associative Array,Nested Table,Varray, also collection methods.","og_url":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/","og_site_name":"Database Tutorials","article_published_time":"2020-10-11T12:25:47+00:00","article_modified_time":"2020-10-11T15:27:55+00:00","og_image":[{"width":829,"height":520,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/10\/plsqlcollections.jpg","type":"image\/jpeg"}],"author":"Yusuf SEZER","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Yusuf SEZER","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/"},"author":{"name":"Yusuf SEZER","@id":"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a"},"headline":"Oracle PL\/SQL Collections","datePublished":"2020-10-11T12:25:47+00:00","dateModified":"2020-10-11T15:27:55+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/"},"wordCount":552,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/10\/plsqlcollections.jpg","keywords":["Associative Array in Oracle PL\/SQL","Associative Array in Oracle PL\/SQL with Example","Collection Methods in Oracle PL\/SQL","Collection Methods in PL\/SQL","Collection Types in Oracle PL\/SQL","Nested Table in Oracle PL\/SQL","Varray in Oracle PL\/SQL","Varray in Oracle PL\/SQL with Example","What is Collection Oracle?","Why do we use collections in Oracle?"],"articleSection":["ORACLE"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/","url":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/","name":"Oracle PL\/SQL Collections - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/10\/plsqlcollections.jpg","datePublished":"2020-10-11T12:25:47+00:00","dateModified":"2020-10-11T15:27:55+00:00","description":"Contains information about Oracle PL\/SQL Collections, types such as Associative Array,Nested Table,Varray, also collection methods.","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/10\/plsqlcollections.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/10\/plsqlcollections.jpg","width":829,"height":520},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2020\/10\/11\/oracle-pl-sql-collections\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"Oracle PL\/SQL Collections"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/be8bf54494b6a89e626cbed2c940599a","name":"Yusuf SEZER","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/19675b3db2d4ce370af047187123e2055a2b254ede3f0e7d9bc934da478146f7?s=96&d=mm&r=g","caption":"Yusuf SEZER"},"url":"https:\/\/dbtut.com\/index.php\/author\/yusufsezer\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/17173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/485"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=17173"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/17173\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/17174"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=17173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=17173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=17173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}