Style Guide - SQL Server Auditing Column Names

Naming convention for auditing fields in a SQL server table.

commit 917f5dd · authored · amended · 1 min read

Style Guide - SQL Server Auditing Column Names

For most of the tables in our DB will have some kind of auditing fields. Following are the column names I used to use for those auditing fields.

Creation Audited

Column NameTypeNullableDescription
CreationTimedatetime2(7)NOT NULLeg. 2019-09-15 13:56:13.8955178
CreatorUserIdNULL

Modification Audited

Column NameTypeNullable
LastModificationTimedatetime2(7)NULL
LastModifierUserIdNULL

Soft Delete

Column NameTypeNullable
IsDeletedbitNOT NULL
DeleterUserIdNULL
DeletionTimedatetime2(7)NULL

If you have worked with ABP before, you know from where I adopted the naming convention.

When I work on a non-ABP project, I used to follow the same column names.

Let me know what you used to name for auditing columns in the comments. 👇

Additional Resources

local graph · open full graph

"Style Guide - SQL Server Auditing Column Names" is connected to the topics SQL Server, Style Guide and related to 8 other entries. SQL Server - Delete Duplicate Rows SQL Server - Delete Duplica… Dapper - Execute Multiple Stored Procedures Dapper - Execute Multiple S… Create SQL Server Database From a Script in Docker-Compose Create SQL Server Database … Microsoft SQL Server Guy Trying Oracle Database Microsoft SQL Server Guy Tr… Docker - SQL Error on ASP.NET Core Alpine Docker - SQL Error on ASP.N… Project management - Organize issues using labels Project management - Organi… Create New Database Level User Create New Database Level U… UTC to UAE Time (Arabian Standard Time) UTC to UAE Time (Arabian St… SQL Server #sql-server Style Guide #style-guide Style Guide - SQL Server Auditing…

comments

loading discussion…