Record the number of rows affects in the last transaction.
INSERT INTO tbTable01
(
Col01
)
SELECT
Col02
FROM
tbTable02
-- logging
SET @iCount = @@ROWCOUNT;
SET @vcMessage = '@@ROWCOUNT = ' + CAST(@iCount AS VARCHAR(10));
Record the number of rows affects in the last transaction.
INSERT INTO tbTable01
(
Col01
)
SELECT
Col02
FROM
tbTable02
-- logging
SET @iCount = @@ROWCOUNT;
SET @vcMessage = '@@ROWCOUNT = ' + CAST(@iCount AS VARCHAR(10));
Comments