--------------------------------------------------------------------------------- Returns the number of rows affected by the last statement. If the number of rows is more than 2 billion, use ROWCOUNT_BIG. USE AdventureWorks; GO UPDATE HumanResources.Employee SET Title = N'Executive' WHERE NationalIDNumber = 123456789 IF @@ROWCOUNT = 0 PRINT 'Warning: No rows were updated'; GO ---------------------------------------------------------------------------------