Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1976

Re: Commenting a table

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Commenting a table
Date 2017-06-16 07:02 +0000
Organization Erland Sommarskog
Message-ID <XnsA7965C8A722AFYazorman@127.0.0.1> (permalink)
References <MPG.33acd793ba3ba35898969a@news.powerusenet.com>

Show all headers | View raw


Jim (jgeissman@socal.rr.com) writes:
> I have a table that contains the criterion values for a statistical test 
> I use in a couple of places. In the code that uses the table I have a 
> comment that describes how the table was populated, and how its values 
> should be used. I would rather have that comment in the table itself, so 
> if someone calls up the table to modify it, or has SQL produce the 
> CREATE code, the comment will be there. Is it feasible to include a 
> comment in CREATE TABLE that will persist with the table?
> 

The code for CREATE TABLE is not saved in the database, so that as such
would not work out. However, you can use extended properties to enter
information about the table or various columns. You can enter them from
Object Explorer in SSMS or use sp_addextendedproperty.

-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Commenting a table Jim <jgeissman@socal.rr.com> - 2017-06-15 18:43 -0700
  Re: Commenting a table Erland Sommarskog <esquel@sommarskog.se> - 2017-06-16 07:02 +0000
    Re: Commenting a table rja.carnegie@gmail.com - 2017-06-16 00:53 -0700
      Re: Commenting a table Erland Sommarskog <esquel@sommarskog.se> - 2017-06-16 10:36 +0000

csiph-web