PL/SQL allows you to use the %type attribute in a nesting variable declaration. : TYPE « PL SQL Data Types « Oracle PL/SQL Tutorial






dept_sales    INTEGER;
area_sales    dept_sales%type;
group_sales     area_sales%type;
regional_sales  area_sales%type;
corporate_sales  regional_sales%type;








21.28.TYPE
21.28.1.Variables Based on Database Columns
21.28.2.PL/SQL allows you to use the %type attribute in a nesting variable declaration.
21.28.3.You may also specify a variable's type using the %TYPE keyword, which tells PL/SQL to use the same type as a specified column in a table.
21.28.4.The %TYPE Command Illustrated
21.28.5.Using %TYPE and %ROWTYPE on Row Objects
21.28.6.Column type parameters
21.28.7.Select value into a column type variable