Search This Blog

Friday, November 23, 2012

sysobjects table SQL Server

SQL Server > System Tables > sysobjects




sysobjects table SQL Server

Contains one row for each database object (constraint, trigger , stored procedure, and so on).

Important columns:

name sysname Object name.
Id int Object identification number.
uid smallint User ID of owner object.
type char(2) Object type:
C = CHECK constraint
D = Default or DEFAULT constraint
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 = Replication filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User table
V = View
X = Extended stored procedure

Example:

select name,id,uid, type from sysobjects where name ='trg_asset_after_update'

name                             id                  uid type
trg_asset_after_update 1719155553 1    TR