0% found this document useful (0 votes)
14 views14 pages

Adbms P3 .2

Uploaded by

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

Adbms P3 .2

Uploaded by

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

Name: Kashyap Patil

Roll No.: 9160

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

10. Write a PL/SQL block to display factorial of given number. Code

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

12. Write a PL/SQL block to display table of given number. Code

Output

13. Write a PL/SQL block to display Area of Circle where radius varies from 1-5. Code

Output

14. Write a PL/SQL block to display summation of 1-10 numbers.


Code
Name: Kashyap Patil
Roll No.: 9160

Output

15. Write a PL/SQL block to display student name. Code

Output

16. Write a PL/SQL block to display star pattern.


Code
Name: Kashyap Patil
Roll No.: 9160

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

20. Write a PL/SQL block to use nested for loop.


Code

Output

You might also like