Category SubcategoryName NumberOfProducts
Bikes Road Bikes
43
33
1
2 Components Road Frames
3 Accessories Tires and Tubes 11
Picture 7.1
Question 8:
[1 mark] Create a stored procedure named proc_product_model to calculate the count of distinct products belonging to a given model where @modelID int is an input parameter and @numberOfProducts int is an output parameter of the procedure.
For example, when we execute the procedure proc_product_model by using the following statements, the result should be as in the following figure:
declare @x int
exec proc_product_model 9, @x output
select @x as NumberOfProducts
NumberOfProducts
12
Zoom
+ 67%
Close