Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the SIS database, write a stored procedure, called spINFO, that takes two input parameters: the DeptID and the CrsID. If the user enters the

Given the SIS database, write a stored procedure, called spINFO, that takes two input parameters: the DeptID and the CrsID. If the user enters the DeptID and the CrsID, the stored procedure returns the number of students who are in that department enrolling in that course.

After creating the stored procedure, execute it and then print the value returned by the stored procedure by showing the following sentence:

Number of students is:

Hint: don't print the returned value inside the stored procedure.

DB:

create table Student( StdID int primary key, Name varchar(20), Proficiency int, Payment varchar(3), DeptID varchar(10) );

create table Department( DeptID varchar(10) primary key, DeptName varchar(50), );

create table Enrollment( StdID int, CrsID varchar(20), Grade int, primary key(StdID,CrsID) );

create table Course( CrsID varchar(20) primary key, CrsName varchar(50), ); ------------------------------------- insert into Student values (1,'John',75,'yes','EE'), (2,'Kathy',92,'no','HIST'), (3,'Chris',72,'yes','HIST'), (4,'John',98,'no','EE') ------------------------------------ insert into Department values ('EE','Electrical Engineering'), ('HIST','History'), ('CLIS','Information Studies') ------------------------------------ insert into Enrollment values (1,'lbsc690',90), (1,'ee750',95), (2,'lbsc690',80), (2,'hist405',60), (3,'hist405',75), (4,'ee600',70) ----------------------------------- insert into Course values ('lbsc690','Information Technology'), ('ee750','Communication'), ('hist405','American History')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

Question 8 Every problem in P can be reduced to 3-SAT, True False

Answered: 1 week ago