Adbms P3 .2
Adbms P3 .2
Practical 3
Aim: Perform query by using sequence.
1. Write a PL/SQL block to check whether given number is positive(use simple if).
Code
Output
2. Write a PL/SQL block to check whether user given input is odd or even. Code
Output
Name: Kashyap Patil
Roll No.: 9160
3. Write a PL/SQL block to check whether user given number is positive, negative or
zero. Code
Output
4. Write a PL/SQL block to accept choice from user for arithmetic operation.
Code
Name: Kashyap Patil
Roll No.: 9160
Output
Name: Kashyap Patil
Roll No.: 9160
5. Write a PL/SQL block to extract customer balance from customer table and perform
operationas
i. If balance below 10000 then display message not eligible for purchase. ii.
If balance between 10000 to 15000 give bonus of 10% else error message of your
choice
Code
Name: Kashyap Patil
Roll No.: 9160
Output
6. Write a PL/SQL block by using simple loop, while loop and for loop. Code
Output
Name: Kashyap Patil
Roll No.: 9160
7. Write a PL/SQL block to display 1-10 numbers in reverse order by using simple
loop, while loop and for loop. Code
Output
8. Write a PL/SQL block to display even numbers between 1-50 by using simple loop.
Code
Name: Kashyap Patil
Roll No.: 9160
Output
9. Write a PL/SQL block to display odd and even numbers between 1-50 by using for
loop Code
Output
Name: Kashyap Patil
Roll No.: 9160
Output
11. Write a PL/SQL block to check whether the given number is prime or not. Code
Output
Name: Kashyap Patil
Roll No.: 9160
Output
13. Write a PL/SQL block to display Area of Circle where radius varies from 1-5. Code
Output
Output
Output
Output
17. Write a PL/SQL block to show use of break and continue statement. Code
Output
Name: Kashyap Patil
Roll No.: 9160
18. Write a PL/SQL block to accept number from user and check weather it is odd.
Code
Output
19. Write a PL/SQL block to create two code block as follows extract cust balance and
perrform operation of updation and balance between 10000 to 50000 increase
balance by 5000 and display customer name and updated balance, if balance is below
10000 display error msg along with customer name by using goto statement.
Code
Name: Kashyap Patil
Roll No.: 9160
Output
Name: Kashyap Patil
Roll No.: 9160
Output