EXECUTE com OUTPUT e valor de retorno
Armazene e exiba o parâmetro de saída e o código de retorno ao executar a SP dbo.cuspRideSummaryDelete.
Este exercicio faz parte do curso
Escrevendo Funções e Procedures no SQL Server
Instruções do exercicio
- Crie variáveis inteiras chamadas
@ReturnStatuse@RowCount. - Passe
'3/1/2018'como valor de@DateParme execute a SPdbo.cuspRideSummaryDelete. - Selecione
@ReturnStatuse@RowCountpara entender o impacto da SP.
exercicio interativo prático
Tente este exercicio completando este código de exemplo.
-- 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';