PL/SQL Program to Swap two Numbers

PL/SQL Program to Swap two Numbers

Here you will know two different method of PL/SQL program to swap two numbers using a temporary variable and without using a temporary variable.

 

PL/SQL Program to Swap two Numbers using temporary variable

Output

Enter the first number:22

Enter the second number:12

Before Swapping:
num1 = 22   and num2 = 12
After Swapping:
num1 = 12   and num2 = 22

PL/SQL Program to Swap two Numbers without using temporary variable

Output

Enter the first number:22

Enter the second number:12

Before Swapping:
num1 = 22   and num2 = 12
After Swapping:
num1 = 12   and num2 = 22

 

 

Check out our other PL/SQL programs examples

 

 

Leave a Comment

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

Scroll to Top