RETURN []
8> CREATE PROC spTestReturns
9> AS
10> DECLARE @MyMessage varchar(50)
11> DECLARE @MyOtherMessage varchar(50)
12>
13> SELECT @MyMessage = 'Hi, '
14> PRINT @MyMessage
15> RETURN
16> SELECT @MyOtherMessage = 'Sorry'
17> PRINT @MyOtherMessage
18> RETURN
19>
20> DECLARE @ReturnVal int
21>
22> EXEC @ReturnVal = spMySproc
23>
24> DECLARE @Return int
25>
26> EXEC @Return = spTestReturns
27> SELECT @Return
28>
29> drop PROC spTestReturns;
30> GO
1>
2>
3>