Library Procedure Assignment5
Library Procedure Assignment5
as
c number;
begin
select to_number(trunc(sysdate-doi)) into c from Borr where rollno=r;
if c >=15 and c<=30 then
c:=c-15;
insert into fine values (r,sysdate,'');
update fine set amt=c*5 where rollno=r;
elsif c>30 then
c:=c-30;
insert into fine values (r,sysdate,'');
update fine set amt=(c*50)+75 where rollno=r;
end if;
update Borr set status='R' where rollno=r;
EXCEPTION
WHEN no_data_found THEN
dbms_output.put_line('No such Rollno !');
end;
------------------------------------------------------------------------------
how to inserting a date in table
insert into borr values (4,'shyam', to_date('20230629','yyyymmdd'), 'CN','I');
d Borr.doi%type;
dbms_output.put_line(c);
dbms_output.put_line(c);
begin
book(5);
end;
declare
begin
demo;
end;