![Free-eBooks.net](/resources/img/logo-nfe.png)
![All New Design](/resources/img/allnew.png)
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