转:SQLServer 在表设计器添加"说明"一列方法

原文地址:http://codebyjoshua.blogspot.com/2014/02/add-column-description-property-to.html


Add the column Description property to the table designer view in SQL Server Management Studio 2012

Wouldn't it be nice to see the column Description property right beside the Allow Nulls column for the columns in your table? This seems like a no-brainer, but it is not that easy to do in SQL Server Management Studio (SSMS). Unfortunately, you have to edit the registry. But if you do it correctly (be careful), you can take your table designer view from looking like this:

SQL Server Management Studio before Description property is added...


to this:

SQL Server Management Studio after Description property is added...


This looks so much more useful!

Follow these instructions for how to do this for SQL Server Management Studio 2012. See the bottom for a link that should work for older versions of SSMS.

USE CAUTION BELOW.

REGEDIT, if not used correctly, can really mess up your computer. I recommend backing up your registry BEFORE trying this. Be sure to back up the WHOLE registry, and not just a portion of it when using File>Export. Notice that at the bottom of the save dialog you can choose the Export Range. You should choose All, so you save the whole registry and not just a portion of it…

Using regedit, modify your registry by going to the following location (for SQL Server Management Studio 2012)

HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0\DataProject

Find and modify the following keys:
SSVPropViewColumnsSQL70
SSVPropViewColumnsSQL80

Modify the values of these keys from    1,2,6;    to    1,2,6,17;    which is effectively just adding 17, which is the value for the table column Description property. You could add probably add other properties as well, as noted below, but I haven’t tried it…

Once you have made the changes, exit Regedit, and restart SQL Server Management Studio. Then you should see the Description column as shown above.

If you wanted to add other columns, you probably could... see the corresponding numbers below...

Property sequence:
1. Column Name
2. Data Type
3. Length
4. Precision
5. Scale
6. Allow Nulls
7. Default Value
8. Identity
9. Identity Seed
10. Identity Increment
11. Row GUID
12. Nullable
13. Condensed Type
14. Not for Replication
15. Formula
16. Collation
17. Description


For older versions of SQL Server Management Studio, see this link…

http://stackoverflow.com/questions/10537610/how-do-i-add-the-description-property-to-the-table-designer-view-in-ssms


翻译一下就是:

在注册表中查找对应SSMS的版本号(Sqlserver2016 对应13.0)下的 

HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0\DataProject

SSVPropViewColumnsSQL70 , SSVPropViewColumnsSQL80,并修改为1,2,6,17;  然后重启SSMS。

需要注意的是,如果连接的数据库非本地的情况下,则修改的注册表是连接的数据库所在的计算机的注册表。

你可能感兴趣的:(转:SQLServer 在表设计器添加"说明"一列方法)