Skip to content

Commit 8018ea6

Browse files
committed
Create function to insert student marks into Student_Marks table
1 parent 968f332 commit 8018ea6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Functions_Correct.sql

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
USE STUDENT_DB;
2+
3+
DELIMITER $
4+
create function function_std(Student_id varchar(10), math int, Science int, English int )
5+
returns int
6+
deterministic
7+
begin
8+
insert into Student_Marks values (student_id, math, science, english);
9+
return 1;
10+
end $
11+
DELIMITER ;
12+
13+
select function_std('s107', 85, 96, 100);
14+
select * from Student_Marks;
15+
16+

0 commit comments

Comments
 (0)