Preperation of the SQL Server database


How to add comments to tables and fields

The preperation of your database will be done directly in the SQL Server Management Console.   You will need to create a custom attribute on the table (or field) that you want to comment.  Name this custom attribute either

  • Description
  • Descr

and use it for your comments:

Table properties  Table Extended Properties

You have two ways of how you can create comments for table columns:  You can directly enter a comment in the field “DESCRIPTION” when you create or edit your table in the design view:

Table Description field

Or  you can do it like you did it for the table-comment:  Going directly to the column properties and there add a new extended property with the name “Descr” or “Description”:

Access a tables fields properties  Table Fields properties

However, you can not  combine these two methods: If you have used the “Description” field in the design view, an also existing extended property “Description” wont be used.

That’s it! Nothing else is needed for writing your comments directly to the SQL Server database.