Sqlserver edit and modify field description (Remarks) sp

Source: Internet
Author: User
To specify the extended attributes, objects in the SQLServer database are divided into three levels (0, 1, and 2 ). Level 0 is the highest level and is defined as an object included in the database scope. Objects of level 1 are included in the architecture scope or user scope, and objects of level 2 are included in level 1 objects. Can be defined for any level of objects in these levels

To specify the extended attributes, objects in the SQL Server database are divided into three levels (0, 1, and 2 ). Level 0 is the highest level and is defined as an object included in the database scope. Objects of level 1 are included in the architecture scope or user scope, and objects of level 2 are included in level 1 objects. Can be defined for any level of objects in these levels

To specify the extended attributes, objects in the SQL Server database are divided into three levels (0, 1, and 2 ). Level 0 is the highest level and is defined as an object included in the database scope. Objects of level 1 are included in the architecture scope or user scope, and objects of level 2 are included in level 1 objects. You can define extended attributes for any level of objects in these levels.

Objects that reference a certain level must be limited by the names of higher-level objects that own or contain them. For example, when you add an extended attribute to a table column (level 2), you must specify the table name (level 1) that contains the column and the schema (Level 0) that contains the table ).

For a complete list of objects and their valid levels 0, 1, and 2, see using extended attributes for database objects.

If all object types and names are empty, the attribute belongs to the current database.

Extended attributes are not allowed for system objects, objects outside the scope of the User-Defined database, or objects not listed as valid inputs in Arguments.

Architecture and users

In earlier versions of SQL Server, you have database objects such as tables, views, and triggers. Therefore, you can add extended attributes to one of these objects and specify the user name as level 0. However, in SQL Server 2005, database objects are included in the architecture. They are independent of users with architecture.

In SQL Server 2005, we recommend that you do not specify USER as level 0 when applying extended attributes to database objects, as this will cause name resolution to be ambiguous. For example, assume that user Mary has two architectures (Mary and MySchema) and both of them contain tables named MyTable. If Mary adds the extension attribute to the MyTable and specifies @ level0type = N 'USER' and @ level0name = Mary, it is not clear which table the extension attribute applies. To maintain backward compatibility, SQL Server applies the attribute to the table contained in the schema named Mary. For more information about users and architectures, see user architecture separation.

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.