(1)
Modify last param in procedure declaration to avoid ambiguity:
create or replace procedure updateStudentResult(id int,
m1 in int,
m2 in int,
m3 in int,
tot out int,
avg out float,
grd out char) -- grade renamed as grd
and replace every occurrence of 'grade := ' to 'grd := '
(2)
the following seems to be oversight:
tot:=m1+m2+m3/3;
most likely you meant:
tot:=m1+m2+m3;
(3)
'UPDATE students SET total=tot,average=avg,grade=grade from students where sid=id;'
seems to be syntax error
should be
UPDATE students SET
total=tot,
average=avg,
grade=grd
where sid=id;