23 319
24 364
25 385
4
4
4
roject managemem TO Project management 75
Noah Fitzgerald
Kennedy Jefferson
Su2020
Project management 86
Project management 87
Cadman Daniels
Fa2022
6,3
7,1
Su2021 B5 3,2
Picture 7.1
Question 8:
Create a stored procedure named P2 to calculate the number of enrollments of a given course where courseCode (varchar(20)) is the input parameter of the procedure and numberOfEnrollments (int) is the output parameter of the procedure.
For example, when we execute the procedure P2 with courseCode = 'DBI202' by using the following statements, the result should be as in the following figure:
declare @x int
exec P2 'DBI202', @x output
select @x as NumberOfEnrollments
NumberOfEnrollments
26
1
Picture 8.1
Question 9:
Create a trigger named Tr_insert_enrollment for the insert statement on the 'enrollment'table so that when we call an insert statement to insert one or more enrollments into the 'enrollment' table, after inserting the corresponding rows into the 'enrollment' table, the system will automatically insert into the 'marks' table the rows with mark = NULL for all the
Zoom
Close
+ 100%