Simple rowcount (urgent)

Simple rowcount (urgent)

 

  

Hi guys can you please figure me out what i am missing out here , i wana get @@rowcount value as output parameter but in my situation here output parameter @Count returning me nothing . Its very simplest situation but something i got to know which i am missing .


Drop proc TEST
GO
CREATE PROC TEST
@Initial AS varchar (64),
@Count INT Output
AS
SELECT
*
FROM
Sysobjects
WHERE Name LIKE @Initial + '%'
Set @Count = @@ROWCOUNT
GO

Declare @Count AS INT
Exec test 'S',@Count
Select @Count


MS Sql Server LazyDBA home page