Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: Commenting a table Date: Fri, 16 Jun 2017 07:02:11 -0000 (UTC) Organization: Erland Sommarskog Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Date: Fri, 16 Jun 2017 07:02:11 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="1c8ce7edabfff4eae71ae68a86ae272c"; logging-data="19567"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vsRk4HoMORvLS810O4skJ" User-Agent: Xnews/2005.10.03 Mime-proxy/1.4.c.4 (Win32) Cancel-Lock: sha1:0gMiXbRy7fUrlAzaPsTZgyZzqLE= Xref: csiph.com comp.databases.ms-sqlserver:1976 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