Detailed explanation of extend in oracle

--Detailed explanation of extend in oracle
--Extend the known array space, for example:

DECLARE
      TYPE   CourseList   IS   TABLE   OF   VARCHAR2(10);
      courses   CourseList;
BEGIN
      -- Initialize array elements, size is 3
      courses   :=   CourseList( 'Biol   4412 ',   'Psyc   3112 ',   'Anth   3001 ');
      -- Add an element to the array, the size of the array is 4, and the element at the end is NULL
      courses.EXTEND;     --   append   one   null   element
      -- Assign value to the added element, if EXTEND is not used, an error will occur here
      courses(4)   :=   'Engl   2005 ';
end

/*Oracle is logically composed of various tablespaces (tablespaces), and tablespaces are composed of segments (segments).
A segment is composed of extends, which is called an area or data area in Chinese.
The area is composed of data blocks one by one, and the size of the data block is determined by the operating system. **/

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326798727&siteId=291194637