SQLUSA

Microsoft SQL Server 2000

Best Practices

 

How can I tell the object type in the sysobjects table?

 

Sysobjects table has the xtype and type column to indicate the object type. Here is the list.

Type = 'C' 'Check Constraint'
Type = 'D' 'Default Constraint'
Type = 'F' 'Foreign Key Constraint'
Type = 'FN' 'Scalar Function'
Type = 'IF' 'Inline table Function'
Type = 'K' 'Primary Key Constraint'
Type = 'L' 'Log'
Type = 'P' 'Stored Procedure'
Type = 'R' 'Rule'
Type = 'RF' 'Replication Filter Stored Procedure'
Type = 'S' 'System Table'
Type = 'TF' 'Table Function'
Type = 'TR' 'Trigger'
Type = 'U' 'User Created Table'
Type = 'V' 'View'
Type = 'X' 'Extended Stored Procedure'


Xtype = 'C' 'Check Constraint'
Xtype = 'D' 'Default Constraint'
Xtype = 'F' 'Foreign Key Constraint'
Xtype = 'FN' 'Scalar Function'
Xtype = 'IF' 'Inline Table Function
Xtype = 'L' 'Log'
Xtype = 'P' 'Stored Procedure'
Xtype = 'PK' 'Primary Key Constraint'
Xtype = 'RF' 'Replication Filter Stored Procedure'
Xtype = 'S' 'System Table'
Xtype = 'TF' 'Table Function'
Xtype = 'TR' 'Trigger'
Xtype = 'U' 'User Created Table'
Xtype = 'UQ' 'Unique Constraint'
Xtype = 'V' 'View'
Xtype = 'X' 'Extended Stored Procedure'

 

 

Best in the World in SQL Server Training
 
SQLUSA.com Home Page