Sysobjectstype attribute in sqlserver

Source: Internet
Author: User
Type enumeration: AF aggregate function (CLR) CCHECK constraint DDEFAULT (constraint or independent) FFOREIGNKEY constraint PKPRIMARYKEY constraint PSQL Stored Procedure PC assembly (CLR) stored Procedure FNSQL scalar function FS assembly (CLR) scalar function FT assembly (CLR) Table function R

Type enumeration: AF = aggregate function (CLR) C = CHECK constraint D = DEFAULT (constraint or independent) F = foreign key constraint PK = primary key constraint P = SQL stored procedure PC = assembly (CLR) Stored Procedure FN = SQL scalar function FS = assembly (CLR) scalar function FT = assembly (CLR) Table function R

The enumerated values of the type are as follows:

AF = aggregate function (CLR)
C = CHECK Constraints
D = DEFAULT (constraint or independent)
F = foreign key constraint
PK = primary key constraint
P = SQL stored procedure
PC = assembly (CLR) Stored Procedure
FN = SQL scalar function
FS = assembly (CLR) scalar function
FT = assembly (CLR) Table Value Function
R = rule (legacy, independent)
RF = replication filtering process
SN = Synonym
SQ = Service Queue
TA = assembly (CLR) DML trigger
TR = SQL DML trigger
IF = SQL inline table Value Function
TF = SQL table Value Function
U = TABLE (user-defined type)
UQ = UNIQUE constraints
V = View
X = Extended Stored Procedure
IT = internal table

-- Obtain the "ID" of the User table from the "table name" of the User table"
Select id, name, xtype from sysobjects where name = 't_ SQLS 'and xtype = 'U ';
-- Obtain all columns of the User table from the "ID" of the sysobjects table
Select name, xtype, colorder, length, isnullable, cdefault from syscolumns where id = 2133582639
-- Obtain the field type name of the user table from the syscolumns table "xtype"
Select name from policypes where xusertype = 167

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.