Created
July 9, 2015 01:52
-
-
Save Fhernd/68b47be3ad2b9cee3be3 to your computer and use it in GitHub Desktop.
Uso de return con valor de retorno.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- OrtizOL - xCSw - http://ortizol.blogspot.com | |
CREATE PROCEDURE ReporteLightBlue AS | |
IF NOT EXISTS | |
(SELECT ProductID | |
FROM Production.Product | |
WHERE Color = 'lightblue') | |
BEGIN | |
-- Retorna 0 para indicar que no existen productos de color lightblue: | |
RETURN 0; | |
END; | |
DECLARE @ValorResultado int; | |
EXEC @ValorResultado = ReporteLightBlue; | |
PRINT @ValorResultado; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment