









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The concept of programmable objects in SQL Server, including stored procedures, triggers, and variables. It also covers control flow constructs and provides examples of stored procedures with input and output parameters. practice examples for creating stored procedures that display data from a relational schema. The resource section includes a website and a book chapter for further reading.
Typology: Slides
1 / 16
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