Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2009-07-21 : 09:41:10
|
| I have a few years program experience but I still do not understand how to use "output parameter" in program. For example, in ASP.NET.Can some experts help me?1) Why need output parameters?2) Whe to use it?3) How to use it? |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-07-21 : 09:46:43
|
| Output parameters allow you to retrieve values from a stored procedure after the stored procedure finishes executing. These values can be set and/or manipulated by the stored procedure. Output parameters can be any data type.-------------------------R.. |
 |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-07-21 : 09:51:33
|
| [code]CREATE PROC SP1 @OUT OUTPUTASBEGIN SET @OUT=10 SELECT @OUTENDGOCREATE PROC SP2ASBEGIN DECLARE @C INT DECLARE @OUT INT EXEC SP1 @OUT OUTPUT SET @C = 10 * @OUT SELECT @CEND[/code]-------------------------R.. |
 |
|
|
|
|
|