@@ROWCOUNT
Description
Returns the number of rows affected by the last statement. (@@ROWCOUNT in Transact-SQL).
Sample Source Pattern
Syntax
@@ROWCOUNT
Examples
Code:
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;
Result:
+-+
| |
+-+
|3|
+-+
Known Issues
No issues were found.
Related EWIs
No related EWIs.
Last updated