SQL Comments on Create Table on SQL Server 2008

后端 未结 7 1604
广开言路
广开言路 2020-11-29 07:37

I need to create some pretty big tables in SQL Server 2008, while I do have SQL Server Management Studio, I would like to comment the tables and the columns when I create th

7条回答
  •  旧巷少年郎
    2020-11-29 08:02

    You can put comments on both tables and columns by creating what are called Extended Properties. You can put extended properties at both the table level and column level. This can be done via T-SQL or SSMS.

    For example, in T-SQL it looks something like this:

    sp_addextendedproperty 'BackColor', 'Red', 'user', '', 'table', ''.
    

    You can read more about it here

    提交回复
    热议问题