Hi sasia
you need to define output parameter to your procedure
for example
create procedure HowMoneyIsInTheWallet
(
@IDOsoby int,
@Wallet int OUTPUT
)
AS
-- your code where you set value to @Wallet
return @Wallet
call the stored procedure
DECLARE @WalletReturned int, @Wallet int
EXEC @WalletReturned = HowMoneyIsInTheWallet @IDOsoby, @Wallet output
print @WalletReturned