Auditing Columns Add

Auditing Columns Add:
I had a need to answer “who”,”where” and “when” questions about the data we add and update.
We didn’t have Auditing columns on all our tables. So I thought about coming up with easy way of Adding Auditing Columns.

Auditing Columns:
CreatedBy Default to USER_NAME()
CreatedDateTime Default to GETUTCDATE()
UpdatedBy
UpdatedDateTime

Adding Auditing Columns Script:

Add Above columns to the tables specified.

ROLLBACK Script:

Drop Constraints and drop Columns Script: