updating and dropping extended properties in a database

Bandi
Posted by Bandi under Sql Server category on | Points: 40 | Views : 220
There are two pre-defined stored procedures in SQL Server to drop/update the extended properties in a database...

Examples,

EXEC sp_updateextendedproperty
@NAME='DeptName_Description',
@value = N'Department name', -- here am updating description of this property
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N'DEPT',
@level2type = N'COLUMN',
@level2name = N'DeptName';


--DROPING AN EXSITING EXTENDED PROPERTY
EXEC sp_dropextendedproperty
@NAME='DeptName_Description',
@level0type = N'SCHEMA',
@level0name = N'dbo',
@level1type = N'TABLE',
@level1name = N'DEPT',
@level2type = N'COLUMN',
@level2name = N'DeptName';


Notice one thing here that @Value clause is not required while dropping an extended property in SQL Server

Comments or Responses

Login to post response