Xtype and type differences in SQL Server system table sysobjects

Source: Internet
Author: User
Tags scalar

Sysobjects a row in the table for each object created within the database (constraints, defaults, logs, rules, stored procedures, and so on). Only in tempdb, each temporary object occupies a row in the table. There are two fields in sysobjects that represent the object type (Type,xtype).
The type is available in SQL Server 6.0, and xtype appears in SQL Server 7.0.
Comparing the type with the xtype, there are some differences: type:
K = PRIMARY KEY or UNIQUE constraint
R = Rule
Xtype
PK = PRIMARY KEY constraint (type is K)
UQ = UNIQUE constraint (type is K)

Xtype type
-the same
c = Check constraint c = CHECK constraint
d = defaults or default constraints D = defaults or DEFAULT constraints
f = FOREIGN key constraint f = FOREIGN key constraint
fn = Scalar function fn = scalar function
if = inline table function if = inline table function
p = Stored Procedure p = stored Procedure
RF = replication filter stored Procedure RF = Copy Filter stored procedure
s = system table S = System table
tf = table function tf = table function
TR = Trigger TR = Trigger
u = User table U = User table
v = View V = view
x = extended Stored Procedure x = Extended stored Procedure
L = Log L = Log


-A different
PK = PRIMARY key constraint (type K) k = PRIMARY key or UNIQUE constraint
UQ = UNIQUE constraint (type is K) R = Rule

Xtype and type differences in SQL Server system table sysobjects

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.