EXECUTE con OUTPUT y valor de retorno
Almacena y muestra tanto el parámetro de salida como el código de retorno al ejecutar el SP dbo.cuspRideSummaryDelete.
Este ejercicio forma parte del curso
Escritura de funciones y procedimientos almacenados en SQL Server
Instrucciones del ejercicio
- Crea variables enteras llamadas
@ReturnStatusy@RowCount. - Pasa
'3/1/2018'como valor de@DateParmy ejecuta el SPdbo.cuspRideSummaryDelete. - Selecciona
@ReturnStatusy@RowCountpara entender el impacto del SP.
ejercicio interactivo práctico
Prueba este ejercicio completando este código de ejemplo.
-- 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';