Differences between xtype and type in the SQL Server System Table sysobjects

Source: Internet
Author: User
Http://m.cnblogs.com/1622/441486.html

Each object created by sysobjects in the database (constraints, default values, logs, rules, stored procedures, etc.) occupies one row in the table. Only TempdbEach temporary object occupies a row in the table.

Sysobjects has two fields (type and xtype) that indicate the object type ).

Type exists in SQL Server 6.0 and xtype exists in SQL Server 7.0.

The differences between type and xtype are as follows:
Type:
K = primary key or unique constraint
R = rule

Xtype:
PK = primary key constraint (type: K)
Uq = unique constraint (type is K)

Type exists to be compatible with previous versions. You can use xtype after SQL Server7.0.
Related Article

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.