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));
Last modified: November 8, 2019

Author

Comments

Write a Reply or Comment