テーブル、カラムの仕様概要などを、拡張プロパティに残しておくとなにかと便利です。テーブルの拡張プロパティを更新するには、下記のストアドを実行します。
EXEC sys.sp_addextendedproperty @name = N'sample', @value = N'サンプル', @level0type = N'SCHEMA', @level0name = N'HumanResources', @level1type = N'TABLE', @level1name = N'Employee';
カラムの拡張プロパティを更新するには、下記のストアドを実行します。
EXEC sys.sp_addextendedproperty @name = N'sample', @value = N'サンプル', @level0type = N'SCHEMA', @level0name = N'HumanResources', @level1type = N'TABLE', @level1name = N'Employee', @level2type = N'COLUMN', @level2name = N'BusinessEntityID';
開発時には、SQL Server Management Studio などでデザインを参照することが多いので、今回の記事のように更新しておくと非常に便利です。