How to create the script with User Defined Extended Properties for tables and columns in SQL Server? The statement should look like:
EXEC sys.sp_addextendedproperty @name=N'WITRSDataObjectId',
Here are the steps to generate script for User Defined Extended Properties for tables and columns in SQL Server:
- Create a brand new table with one column in a new L/P with SQL Server as DBMS
- Go to table properties and assign an owner / schema to table (this is required)
- In table properties, select UDP Tab and create a new UDP. Make sure the box "Is Database Property" is checked (selected) when creating the UDP, whether Table or Column level.
- When generating a script, please make sure select the box "User Defined Properties" under FE/Other Options window.