sql-server | style-guide

Style Guide - SQL Server Auditing Column Names

Naming convention for auditing fields in a SQL server table.

Abhith RajanFebruary 05, 2020 · 2 min read · Last Updated:

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

Written by Abhith Rajan
Abhith Rajan is an aspiring software engineer with more than 8 years of experience and proven successful track record of delivering technology-based products and services.
Buy me a coffee

Was this helpful?

👈 This is a live react editor.

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub

Related ArticlesView All

Related VideosView All

Azure SQL Game Changers for Developers | BDL112

Related StoriesView All

Related Tools & ServicesView All

SmarterASP.NET

SmarterASP.net - Unlimited ASP.NET Web Hosting

ASP.NET Hosting by SmarterASP.net. Unlimited ASP.NET Hosting Plans Starting at $2.95 a month.