將數據庫遷移到 Azure SQL 數據庫時出現錯誤,不支持擴展屬性「MS_Description」,所以就如何操做擴展屬性進行在此記錄。數據庫
查詢擴展屬性spa
SELECT *,OBJECT_NAME(major_id) AS obj_name FROM sys.extended_properties
添加擴展屬性code
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'This is a table description on [T8](2).', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'T8' GO
修改擴展屬性blog
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'This is a column description on [id](3).', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'T8', @level2type = N'COLUMN', @level2name = N'id' GO
刪除擴展屬性ip
EXEC sp_dropextendedproperty @name = N'MS_Description', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'FilterPageItem', @level2type = N'COLUMN', @level2name = N'ColIndex' GO