OBJECT_ID used to uniquely identify an object in the base tables of the system.
This is the sys.sysschobjs base table primary key used by the sys.objects metadata sys.objects and appears in many other metadata views. e.g. sys.partitions . If you do not request these representations, then OBJECT_ID not very useful, except, perhaps, when using the object to verify existence, as shown below.
IF OBJECT_ID('T', 'U') IS NULL /*Table T does not exist or no permissions*/
An object with a schema area is an object that belongs to a schema (for example, a table, view, stored procedure). The MSDN article provides an example of an object with an unstructured scope in DDL triggers.
An error occurred while trying to specify the schema when creating these
CREATE TRIGGER dbo.SomeTrigger ON DATABASE FOR DROP_SYNONYM AS PRINT 'SomeTrigger'
Object metadata with restricted sys.sysschobjs areas is stored in sys.sysschobjs but not displayed in the sys.objects .
source share