EXECUTE with OUTPUT & return value
Store and display both the output parameter and return code when executing dbo.cuspRideSummaryDelete SP.
Deze oefening maakt deel uit van de cursus
Writing Functions and Stored Procedures in SQL Server
Oefeninstructies
- Create integer variables named
@ReturnStatusand@RowCount. - Pass
'3/1/2018'as the@DateParmvalue and executedbo.cuspRideSummaryDeleteSP. - Select
@ReturnStatusand@RowCountto understand the impact of the SP.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
-- Create @ReturnStatus
___ ___ AS ___
-- Create @RowCount
___ ___ AS ___
-- Execute the SP, storing the result in @ReturnStatus
___ ___ = ___.___
-- Specify @DateParm
___ = '3/1/2018',
-- Specify RowCountOut
@RowCountOut = @RowCount OUTPUT
-- Select the columns of interest
___
___ AS ReturnStatus,
___ AS 'RowCount';