Please check the below example:
alter PROCEDURE UpdateLogin
@UserName nvarchar(15),
@UpdateCount int OUTPUT
AS
update login set username=@UserName where userid<4
select @UpdateCount = @@rowcount
RETURN @UpdateCount
DECLARE @TheCount INT
exec UpdateLogin @UserName = 'sa', @UpdateCount = @TheCount OUTPUT
SELECT TheCount = @TheCount
Thursday, December 31, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment