- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Check if a number is Palindrome in PL/SQLs
In this section we will see how to check whether a number is Palindrome or not using the PL/SQL. In PL/SQL code, some group of commands are arranged within a block of related declaration of statements.
A number is palindrome if the number, and the reverse of that number are same. Suppose a number 12321, this is palindrome, but 12345 is not a palindrome.
DECLARE n number; m number; temp number:=0; rem number; BEGIN n :=12321; m :=n; while n>0 loop rem := mod(n,10); temp := (temp*10)+rem; n := trunc(n/10); end loop; if m = temp then dbms_output.put_line('Palindrome'); else dbms_output.put_line('Not Palindrome'); end if; END;
- Related Articles
- Check if a number is Palindrome in C++
- Check if binary representation of a number is palindrome in Python
- Bash program to check if the Number is a Palindrome?
- Palindrome in Python: How to check a number is palindrome?
- Python program to check if a given string is number Palindrome
- Check if number is palindrome or not in Octal in Python
- Check if a given year is leap year in PL/SQL
- Write a C# program to check if a number is Palindrome or not
- Recursive program to check if number is palindrome or not in C++
- Check if a string is palindrome in C using pointers
- Recursive function to check if a string is palindrome in C++
- Golang Program to check if the binary representation of a number is palindrome or not
- C Program to Check if a Given String is a Palindrome?