This type is local to this block : Variable Scope « PL SQL « Oracle PL / SQL






This type is local to this block

  
SQL>
SQL>
SQL> CREATE OR REPLACE TYPE NameList AS
  2    VARRAY(20) OF VARCHAR2(30);
  3  /

Type created.

SQL>
SQL>
SQL> DECLARE
  2
  3    TYPE DateList IS VARRAY(10) OF DATE;
  4
  5    v_Dates DateList;
  6    v_Names NameList;
  7  BEGIN
  8    NULL;
  9  END;
 10  /

PL/SQL procedure successfully completed.

SQL>
SQL>

   
  








Related examples in the same category

1.Variable scope in variable 'declare' block
2.Illustrates the scope of various identifiers
3.Variable scope in a PL/SQL
4.Identifiers defined in the declaration of the child block are only in scope and visible within the child block itself.
5.if you try to reference a variable before you declare it because PL/SQL requires an identifier be declared before we use it in our code
6.Reference Type in another block as well
7.variable scope with nested block
8.Override your scope access to containing blocks by reusing an identifier in a nested block