









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










create procedure getstudentCGPA @studentID int, @CGPA int output AS select CGPA from student where studentID = @studentID go declare @var int Execute getstudentCGPA 12 , @CGPA= @var output
Practice Problem 2
create procedure studentinfo @studentname char(30) as begin declare @grade char(2) declare @cgpa int select @cgpa = (select cgpa from student1 where student_name = @studentname) if(@cgpa = 3) begin set @grade = 'B' end if (@cgpa = 2) begin set @grade = 'C' end update student set grade = @grade where student_name = @studentname select student_name,course_title,grade from student1 as s inner join course as c on s.course_id = c.course_id where s.student_name = @studentname end go