Total_Changes SQL Function
The Total_Changes() function returns the total number of changes by inserted, modified or deleted by all INSERT, UPDATE or DELETE statements completed since the database connection was opened, including those executed as part of trigger. Executing any other type of SQL statement does not affect the value. Changes made as part of foreign key actions are included in the count, but those made as part of REPLACE constraint resolution are not. Changes to a view that are intercepted by INSTEAD OF triggers are not counted.
Syntax Total_Changes()
/* Following will return number of total changes */
SELECT Total_Changes();