![Free-eBooks.net](/resources/img/logo-nfe.png)
![All New Design](/resources/img/allnew.png)
%ROWTYPE, %TYPE inherits the definition of the column whereas
%ROWTYPE inherits all the column data types on a result set, For example:
Cursor staff-cursor is select * from staff-master; Staff-cursor-val staff-cursor%ROWTYPE;
Staff-name-val staff-cursor-val,staff-name%TYPE,
Here in the database staff-name has varchar2(200), hence staff-name-Val has been declared as varchar2(200), All the columns datatypes are assigned as in the table to this cursor staff-cursor-val, Another important role player command in PLlSQL is
If < some condition >
then < some action>
elsif < some condition >
then < some action>
else
< some condition>
end if;
18.01 How to use if conditions
for example :
if avg-marks > 60 then
result : "First Class" -- assigning some value to variable result elsif avg-marks > 50 then
result : "Second Class" -- assigning values else
result : "Not qualified" -- assigning values