Property data updating description

EXTENDED_PROPERTIES WHERE [major_id] = OBJECT_ID('Table_Name') AND [name] = N'MS_Description' AND [minor_id] = (SELECT [column_id] FROM SYS.

COLUMNS WHERE [name] = 'Column_Name' AND [object_id] = OBJECT_ID('Table_Name'))) EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'This column is responsible for holding information for table Table_Name.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Table_Name', @level2type = N'COLUMN', @level2name = N'Column_Name'; When you "Ask Question" you have the option to "Answer your own question - share your knowledge, Q&A style".

This JSON should contain property attributes that you want to add to or update.

See the sample JSON below for an example of this snippet of JSON.

COLUMNS WHERE [name] = @column AND [object_id] = OBJECT_ID(@table))) EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = @descr, @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = @table, @level2type = N'COLUMN', @level2name = @column; ELSE EXECUTE sp_updateextendedproperty @name = N'MS_Description', @value = @descr, @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = @table, @level2type = N'COLUMN', @level2name = @column; ELSE IF NOT EXISTS (SELECT NULL FROM SYS.

property data updating description-7property data updating description-12property data updating description-30

The function returns an array with the ids of the added items. The method will throw an Error when an item with the same id as any of the added items already exists. Syntax: The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the Data Set.

This is what I did since I could not find a question similar to mine while researching the solution.

IF OBJECT_ID ('dbo.usp_addorupdatedescription', 'P') IS NOT NULL DROP PROCEDURE dbo.usp_addorupdatedescription; GO CREATE PROCEDURE usp_addorupdatedescription @table nvarchar(128), -- table name @column nvarchar(128), -- column name, NULL if description for table @descr sql_variant -- description text AS BEGIN SET NOCOUNT ON; DECLARE @c nvarchar(128) = NULL; IF @column IS NOT NULL SET @c = N'COLUMN'; BEGIN TRY EXECUTE sp_updateextendedproperty N'MS_Description', @descr, N'SCHEMA', N'dbo', N'TABLE', @table, @c, @column; END TRY BEGIN CATCH EXECUTE sp_addextendedproperty N'MS_Description', @descr, N'SCHEMA', N'dbo', N'TABLE', @table, @c, @column; END CATCH; END GO I like the approach this has, however i ran into an instance where i am having Open Transactions after executing this query.

If you are using the UWP Toolkit Notifications library, the feature(s) can be found in version 1.4.0 or higher.

New in Creators Update: In the most recent Windows 10 Creators Update, we added several exciting improvements and new features to toast notifications and Action Center.

Leave a Reply