Mega Code Archive

 
Categories / Oracle PLSQL / PL SQL
 

Variable scope in variable declare block

SQL> SQL> SQL> -- variable scope SQL> SQL>  declare   2      l_number number := l_another_number;   3      l_another_number number := 10;   4    begin   5      null;   6    end;   7    /     l_number number := l_another_number;                        * ERROR at line 2: ORA-06550: line 2, column 24: PLS-00320: the declaration of the type of this expression is incomplete or malformed ORA-06550: line 2, column 14: PL/SQL: Item ignored