Unnamed PLSQL
Unnamed PLSQL
Practical 4: Unnamed PL/SQL code block: Use of Control structure and Exception
handling is mandatory.
Write a PL/SQL block of code for the following requirements:
• Check the number of days (from date of issue), if days are between 15 to 30 then
fine amount will be Rs Sper day.
• If no. of days>30, per day fine will be Rs 50 per day & for days less than 30,
Rs. 5 per day.
• If condition of fine is true, then details will be stored into fine table.
Frame the problem statement for writing PL/SQL block inline with above statement.
..............................................................................
mysql> delimiter //
-> begin
-> end;
-> select datediff(curdate(), DOI) into X from Borrower where Roll_no = Roll_new;
-> if (X>15&&X<30)
-> then
-> if(X>30)
-> then
end if;
-> end;
>//
| NOT FOUND |
| NOT FOUND |