PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation’s procedural extension for SQL and the Oracle relational database. It is one of three key programming languages which is only available in Oracle Database.
PL/SQL is classified as follows:
3) Literals and
Input number: 9876543210
Output number: 0123456789
Copy the below PL/SQL program and execute it. In this program, we are going to share how to reverse a number in PL/SQL with the output.
len := length(num);
for i in reverse 1.. len
revnum := revnum || substr(num,i,1);
dbms_output.put_line('given number ='|| num);
dbms_output.put_line('The reverse number ='|| revnum);
The reverse of number is 0123456789
Liked this program? Do Like & share with your friends.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.