轉自: http://www.maomao365.com/?p=8919
摘要:
下文講述使用sql腳本對資料表或資料列添加注釋(備注說明)的方法分享,如下所示:
實驗環境:sql server 2008 r2
實作思路:
使用系統存盤程序sys.sp_addextendedproperty對表和列的相關屬性進行設定,達到為資料表或資料列添加注釋的目的
--資料表添加注釋的方法分享EXEC sys.sp_addextendedproperty @name = N'MS_Description',@value = N'資料表注釋說明', @level0type = N'SCHEMA',@level0name = N'dbo', @level1type = N'TABLE',@level1name = N'資料表名稱'--資料欄位添加注釋的方法分享EXEC sys.sp_addextendedproperty @name = N'MS_Description',@value = N'資料列注釋說明', @level0type = N'SCHEMA',@level0name = N'dbo', @level1type = N'TABLE',@level1name = N'資料表名稱', @level2type = N'COLUMN',@level2name = N'欄位名'
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/28284.html
標籤:SQL Server
上一篇:SQLServer筆記
下一篇:Example of SQL Linux Windows Authentication configuration using Managed Service Accounts
