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

Proc Grade

Uploaded by

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

Proc Grade

Uploaded by

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

create or replace procedure proc_grade( roll in number)

as
t stud_marks.tot_marks%type;
begin
select m.tot_marks into t from stud_marks m where m.rollno=roll;
if (t<=1500 and t>=990) then
update result set class='distinction' where rollno=roll;
dbms_output.put_line(roll);
dbms_output.put_line('distinction');
elsif (t<=989 and t>=900 ) then
update result set class='first class' where rollno=roll;
dbms_output.put_line(roll);
dbms_output.put_line('first class');
elsif(t<=899 and t>=825)then
update result set class='second class' where rollno=roll;
dbms_output.put_line(roll);
dbms_output.put_line('second class');
else
update result set class='pass' where rollno=roll;
end if;
end;

You might also like