Pl/SQL Program for Palindrome Number

Here you will get pl/sql program for palindrome number.

A number is called palindrome number if its reverse is equal to itself. For example 12321 is palindrome while 123 is not palindrome.

Pl/SQL Program for Palindrome Number

Output

number is palindrome

Comment below if you have any queries regarding above palindrome program in pl sql.


One thought on “Pl/SQL Program for Palindrome Number

  1. ehsan ilahi

    DECLARE
    X VARCHAR2(20) := ‘&TYPR_STRING’;
    Y VARCHAR2(20);
    BEGIN
    SELECT 1 INTO Y FROM DUAL
    WHERE X = REVERSE(X);
    IF Y IS NOT NULL THEN
    DBMS_OUTPUT.PUT_LINE(‘STRING IS PALINDROME’);
    END IF;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    DBMS_OUTPUT.PUT_LINE(‘STRING IS NOT PALINDROME’);
    END;

    try this 🙂 …..

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.