Practical No 05
Practical No 05
05
Name : Renuka Jadhav Roll No. : 49
Div : C
Aim : Write a Stored Procedure namely proc_Grade for the categorization of student. If marks
scored by students in examination is <=1500 and marks>=990 then student will be placed in
distinction category if marks scored are between 989 and900 category is first class, if
marks899and 825 category is Higher Second Class. Write a PL/SQLblock to use procedure
created with above requirement. Stud_Marks(name, total_marks) Result(Roll,Name, Class)
| information_schema |
| library |
| mysql |
| performance_schema |
| practicle3 |
| renuka |
| sbibank |
| sys |
| user_auth |
+--------------------+
-> ELSEIF total_marks < 990 AND total_marks >= 900 THEN
-> INSERT INTO result(roll_no, name, class)
-> VALUES(roll_no, name, 'First class');
-> ELSEIF total_marks < 900 AND total_marks >= 825 THEN
-> INSERT INTO result(roll_no, name, class)
mysql> DELIMITER ;
mysql> CALL set_class(1,"renuka",1200);
Query OK, 1 row affected (0.01 sec)
+---------+--------+-------------+
| roll_no | name | class |
+---------+--------+-------------+
| 1 | renuka | Distinction |
+---------+--------+-------------+
1 row in set (0.00 sec)