sys.objects
- It contains a row for each user-defined, schema-scoped object that is created within a database.
- Objects that are not schema-scoped, such as DDL triggers, cannot be queried by using OBJECT_ID.
- For objects that are not found in the sys.objects catalog view, obtain the object identification numbers by querying the appropriate catalog view.
- For example, to return the object identification number of a DDL trigger, use:
SELECT OBJECT_ID
FROM sys.triggers
WHERE name = 'DatabaseTriggerLog'
Object Type
- AF = Aggregate function (CLR)
- C = CHECK constraint
- D = DEFAULT (constraint or stand-alone)
- F = FOREIGN KEY constraint
- FN = SQL scalar function
- FS = Assembly (CLR) scalar-function
- FT = Assembly (CLR) table-valued function
- IF = SQL inline table-valued function
- IT = Internal table
- P = SQL Stored Procedure
- PC = Assembly (CLR) stored-procedure
- PG = Plan guide
- PK = PRIMARY KEY constraint