Variable attributes | Anchor notations | %type, %rowtype in Oracle PL SQL Interview Questions And Answers For Experienced & Freshers | Interview Preparation
Variable attributes used in place of datatypes in variable declaration.
There are two types of variable attributes:
1) Column level attribute
2) Row level attribute
1) Column level attribute -
In this method we are defining attributes for individual columns.
Column level attributes are represented by %type.
Whenever we are using column level attributes oracle server internally allocates memory for the variables as same as the corresponding column datatype in a table.
e.g. v_ename emp.ename%type ;
2) Row level attribute -
In this method single variable can represent all different datatypes in a row within a table. This variable also called as record type variable. row level attributes represented by %rowtype.
e.g. i emp%rowtype ;
Please do check our daily posts, videos for beneficial informations, in case of any additional queries please do contact us, we are happy to assist you.
https://www.youtube.com/a4uofficial
0 Comments