Oracle SQL, PLSQL, APEX How To's by Dr. S. Raghunathan - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

%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

 

Find Your Next Great Read

Describe what you're looking for in as much detail as you'd like.
Our AI reads your request and finds the best matching books for you.

Showing results for ""

Popular searches:

Romance Mystery & Thriller Self-Help Sci-Fi Business