2020年11月22日 星期日

SQL Server Management Studio 資料表設計模式顯示欄位描述

SQL Server Management Studio 資料表設計模式顯示欄位描述

相信各位自以前設計資料表時,

都會有替資料表欄位的描述寫上註解說明的好習慣,

但是每次看欄位描述裡的註解說明時,

都要先選取該欄位,

然後在屬性位置查看欄位描述的註解說明,

非常的麻煩與不直覺。

以下方法使用 regedit.exe 修改機碼,

可以讓你在設計模式就可以直接編輯查看欄位描述。


首先,依據你 SSMS 的版本找到對應的機碼位置

HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\版本\DataProject

修改以下兩個機碼

SSVPropViewColumnsSQL70 從 1,2,6; 改為 1,2,6,17;

SSVPropViewColumnsSQL80 從 1,2,6; 改為 1,2,6,17;


這裡提供其他屬性欄位代號,

讓各位可以依據自己的需求,

客製調整設計模式要顯示的欄位資料。

各個屬性欄位代號:

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


本文參考
https://ryojaw.blogspot.tw/2017/04/sql-server-management-studio.html