Display column comments like access using SQL extension attributes

Source: Internet
Author: User
The design view of access has a good function-design column comments, which allows the designer to clearly see the meaning of each column. This function is not available when SQL Server creates a table, but it has extended attributes. This function is also good. You can write comments here, then, return the corresponding results as rs to the page for application. I think, this is in the number of dynamic display

The design view of access has a good function-design column comments, which allows the designer to clearly see the meaning of each column. Generally, SQL server does not have this function when creating a table, but it has extended attributes. This function is also good. You can write comments here, then, return the corresponding results as rs to the page for application. I think, this is in the number of dynamic display

The design view of access has a good function-design column comments, which allows the designer to clearly see the meaning of each column. Generally, SQL server does not have this function when creating a table, but it has extended attributes. This function is also good. You can write comments here, then return the corresponding result as rs to the page for application.

I think this may be useful when the column information of the table in the database is dynamically displayed (as you may have asked in the Forum before)

The specific method is as follows: (you can also right-click the corresponding column in EM and QA to add attributes)

EXEC sp_addextendedproperty 'crid', 'indicates id', 'user', dbo, 'table', 'clientinfo', 'column', CRid

Go

EXEC sp_addextendedproperty 'personal name', 'display customer name', 'user', dbo, 'table', 'clientinfo', 'column', Rname

Go

Select name, value from: fn_listextendedproperty

(Default, 'user', 'dbo', 'table', 'clientinfo', 'column', default)

Go

Name value

---------------------------------------------

CRid indicates ID

Show CUSTOMER NAME

This can be used as a result set.

Here, the multi-Table value function fn_listextendedpeoperty is briefly described.

When querying, because it is a system multi-Table value function, you must first include ::

1st attribute names are specified ---- if default or NULL is used to display all

For the 2-7 parameters, see the object naming rules of SQL.

If you use default, specify all

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.