Returns the number of rows affected by the last statement. ().
Sample Source Pattern
Syntax
@@ROWCOUNT
SQLROWCOUNT
Examples
Code:
IN -> SqlServer_01.sql
CREATE TABLE table1
(
column1 INT
);
CREATE PROCEDURE procedure1
AS
BEGIN
declare @addCount int = 0;
INSERT INTO table1 (column1) VALUES (1),(2),(3);
set @addCount = @addCount + @@ROWCOUNT
select @addCount
END
;
GO
EXEC procedure1;