Reference Type in another block as well : Variable Scope « PL SQL « Oracle PL / SQL






Reference Type in another block as well

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

Type created.

SQL>
SQL>
SQL>
SQL> DECLARE
  2    v_Names2 NameList;
  3  BEGIN
  4    NULL;
  5  END;
  6  /

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.This type is local to this block
7.variable scope with nested block
8.Override your scope access to containing blocks by reusing an identifier in a nested block