We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is how it can be done:
EXEC sp_updateextendedproperty --or sp_addextendedproperty @name = N'MS_Description', @value = 'Your description', @level0type = N'Schema', @level0name = dbo, @level1type = N'Table', @level1name = Your Table Name, @level2type = N'Column', @level2name = Yuur Column Name;
Or, more specifically (as we need to distinguish between "add" and "update"):
BEGIN TRY EXEC sp_addextendedproperty 'MS_Description', 'Table X', 'schema', 'dbo', 'table', 't'; END TRY BEGIN CATCH EXEC sp_updateextendedproperty 'MS_Description', 'Table X', 'schema', 'dbo', 'table', 't'; END CATCH
Also, if a table is not qualified, then we can replace the 'schema', 'dbo' arguments by 'schema', 'schema_name()'
'schema', 'dbo'
'schema', 'schema_name()'
See:
The text was updated successfully, but these errors were encountered:
[#6986] Emulate COMMENT ON in SQL Server using sp_updateextendedproperty
7adbd3a
No branches or pull requests
This is how it can be done:
Or, more specifically (as we need to distinguish between "add" and "update"):
Also, if a table is not qualified, then we can replace the
'schema', 'dbo'
arguments by'schema', 'schema_name()'
See:
The text was updated successfully, but these errors were encountered: