Comece agoraComece grátis

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

Ver curso

Instruções do exercicio

  • Crie variáveis inteiras chamadas @ReturnStatus e @RowCount.
  • Passe '3/1/2018' como valor de @DateParm e execute a SP dbo.cuspRideSummaryDelete.
  • Selecione @ReturnStatus e @RowCount para 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';
Editar e Executar Código