0% found this document useful (0 votes)
85 views1 page

PLSQL

This document contains instructions for writing PL/SQL code blocks to perform various tasks: 1) Calculate the area of a circle using host and local variables, 2) Check a user balance against a minimum and deduct fees if needed, 3) Swap the values of two variables and print them, 4) Print odd numbers from 1 to 10 using a loop, and 5) Print numbers from 10 to 1 in reverse order using a FOR loop.

Uploaded by

AbdulMajidva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views1 page

PLSQL

This document contains instructions for writing PL/SQL code blocks to perform various tasks: 1) Calculate the area of a circle using host and local variables, 2) Check a user balance against a minimum and deduct fees if needed, 3) Swap the values of two variables and print them, 4) Print odd numbers from 1 to 10 using a loop, and 5) Print numbers from 10 to 1 in reverse order using a FOR loop.

Uploaded by

AbdulMajidva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

PL/SQL

1. Create a program script that uses a PL/SQL anonymous block to perform the
following: Use a host variable AREA to store the result. Declare a local variable
RADIUS with numeric data type. Declare a constant PI with value 3.14. Assign a
value to the variable RADIUS by using a substitution variable, Calculate area of a
circle by using the formula AREA = P1 * RADIUS * RADIUS .Then, print the
result

2. Write a PL/SQL code block, that will accept an account number from the user.
Check if the user balance is less than the minimum balance , then deduct Rs,100
from the balance . the process is fired on the account master table.

3. Write a PL/SQL block to swap the values of two variables. Print the variables
before and after swapping.

4. Write a PL/SQL block to print all odd numbers between 1 and 10 using a basic
loop.

5. Using a FOR loop, print the values 10 to 1 in reverse order.

You might also like