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


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

Re: Commenting a table

Newsgroups comp.databases.ms-sqlserver
Date 2017-06-16 00:53 -0700
References <MPG.33acd793ba3ba35898969a@news.powerusenet.com> <XnsA7965C8A722AFYazorman@127.0.0.1>
Message-ID <343bf905-255b-483f-9c70-423b4a5e0dc4@googlegroups.com> (permalink)
Subject Re: Commenting a table
From rja.carnegie@gmail.com

Show all headers | View raw


On Friday, 16 June 2017 08:05:53 UTC+1, Erland Sommarskog  wrote:
> 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

Does that depend on the second developer taking
an interest in extended properties?  Or does it
just pop up in the script of the table definition?

My goofy suggestion is to include a computed 
column called "about_this_table", that is defined 
to consist of the comment text as a literal char
string.

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