sql2000 Add table comments, column comments, and modify Delete comments

Source: Internet
Author: User

--Create a table
--create table tables (A1 varchar), A2 char (2))

--Add descriptive information to the table
EXECUTE sp_addextendedproperty ' ms_description ', ' Personnel information table ', ' user ', ' dbo ', ' table ', ' Tables ', NULL;

--Add descriptive information for field A1
EXECUTE sp_addextendedproperty ' ms_description ', ' name ', ' user ', ' dbo ', ' table ', ' table ', ' column ', ' A1 '


--Add descriptive information for field A2
EXECUTE sp_addextendedproperty N ' ms_description ', ' Gender ', ' user ', ' dbo ', ' table ', ' table ', ' column ', ' A2 '

--Update the Description property of the column A1 in the table:
EXEC sp_updateextendedproperty ' ms_description ', ' Field 1 ', ' user ', dbo, ' table ', ' table ', ' column ', A1

--Delete The Description property of the column A1 in the table:
--exec sp_dropextendedproperty ' ms_description ', ' user ', dbo, ' table ', ' Tables ', ' column ', A1

--Delete test
--drop Table Tables


EXEC sp_addextendedproperty n ' ms_description ', n ' basic information _ excipients Inventory table (useless) ', n ' user ', n ' dbo ', n ' table ', n ' BASE_FLKC ';
EXEC sp_addextendedproperty n ' ms_description ', n ' basic information _ excipient Information table (useless) ', n ' user ', n ' dbo ', n ' table ', n ' base_flxx ';

sql2000 Add table comments, column comments, and modify Delete comments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.