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.

result varchar2(50);

 

begin

 

--- length function is called for deriving the number of characters stored

--- in the variable (given_string_varchar2(50))

 

 

 

repeat_loop_count := length(given_string);

 

--- while command will decide whether to execute the following commands

--- or not

 

while repeat_loop_count > 0

 

--- loop and end loop is the syntax for doing exercises in repetetively

 

--- termination of loop will be decided by while command.

 

 

 

loop

 

result := result II substr(given_string,repeat_loop_count,1);

 

repeat_loop_count := repeat_loop_count - 1 ;

 

end loop;

 

dbms_output.put_line(result);

 

end

 

RESULT:

 

NAHTANUHGAR

 

Statement processed.

 

0.00 seconds