Picture 7.1
Question 8:
Create a stored procedure named P1 to calculate the number of bookings made by a given passenger where passenger_id int is the input parameter of the procedure and numberOfBookings int is the output parameter of the procedure.
For example, when we execute the procedure P1 with passenger_id = 1 by using the following statements, the result should be as in the following figure:
declare @x int
exec P1 1, @x output
select @x as NumberOfBookings
6 of 6
Paper No: 5
1
NumberOfBookings
Picture 8.1
1
Zoom
113%
Close