- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
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.
Example
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;
Output
Palindrome
- 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++
- Verification if a number is Palindrome in JavaScript
- 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
- JavaScript - Find if string is a palindrome (Check for punctuation)
- C Program to Check if a Given String is a Palindrome?

Advertisements