sysobjects table
Each object created within the database (constraints, default values, logs, rules, stored procedures, and so on) occupies a single row in the table. Only within tempdb, each temporary object occupies one row in the table.
Column name Data type description
Name sysname object name.
ID int object identification number.
Xtype char (2) object type. Can be one of the following object types:
C = CHECK Constraint
D = defaults or DEFAULT constraints
F = FOREIGN KEY constraint
L = Log
FN = Scalar function
IF = Inline Table function
P = Stored Procedure
PK = PRIMARY KEY constraint (type is K)
RF = copy Filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User Table
UQ = UNIQUE constraint (type is K)
V = view
X = Extended Stored Procedure
UID smallint the user ID of the owner object.
Info smallint reserved. Internal use only.
status int reserved. Internal use only.
Base_schema_
ver int reserved. Internal use only.
replinfo int reserved. For replication use.
The object identification number of the Parent_obj int parent object (for example, for a trigger or constraint, the identification number is a table ID).
Crdate the date the DateTime object was created.
Ftcatid smallint Full-text catalog identifier for all user tables registered for full-text indexing, or 0 for all user tables that are not registered.
The Schema_ver int version number, which is incremented each time the schema of the table changes.
Stats_schema_
ver int reserved. Internal use only.
Type char (2) object types. Can be one of the following values:
C = CHECK Constraint
D = defaults or DEFAULT constraints
F = FOREIGN KEY constraint
FN = Scalar function
IF = Inline Table function
K = PRIMARY KEY or UNIQUE constraint
L = Log
P = Stored Procedure
R = Rule
RF = copy Filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User Table
V = view
X = Extended Stored Procedure
Userstat smallint reserved.
Sysstat smallint internal state information.
Indexdel smallint reserved.
Refdate datetime is reserved for later use.
version int is reserved for later use.
Deltrig int reserved.
Instrig int reserved.
Updtrig int reserved.
Seltrig int reserved.
Category int is used for publishing, constraining, and identifying.
Cache smallint reserved.
can be very convenient to use
SELECT * from sysobjects where xtype= ' TR ' and parent_obj=object_id (' Table name ')
Find out the information of the table
Xtype in the syscolumns table
Check, these things are stored in each database syscolumns table, name is the column name, xtype is the data type, but this xtype is a number, the following is the relationship between the number and data type;
Xtype=34 ' Image '
Xtype= ' text '
xtype=36 ' uniqueidentifier '
xtype=48 ' tinyint '
xtype=52 ' smallint '
xtype=56 ' int '
xtype=58 ' smalldatetime '
xtype=59 ' real '
Xtype=60 ' Money '
Xtype=61 ' datetime '
xtype=62 ' float '
xtype=98 ' sql_variant '
xtype=99 ' ntext '
xtype=104 ' bit '
xtype=106 ' decimal '
xtype=108 ' numeric '
xtype=122 ' smallmoney '
xtype=127 ' bigint '
xtype=165 ' varbinary '
xtype=167 ' varchar '
xtype=173 ' binary '
xtype=175 ' char '
xtype=189 ' timestamp '
xtype=231 ' nvarchar '
xtype=239 ' nchar '
xtype=241 ' xml '
xtype=231 ' sysname '
Introduction to SQL Server Xtype