OBJECT_ID() Metadata Function TSQL Tutorial

Returns the database object id number of a schema object.

OBJECT_ID() Syntax:

OBJECT_ID ( 'database_name . schema_name . object_name' )

OBJECT_ID() Example:

SELECT OBJECT_ID('model.dbo.products') AS 'Object ID of Table',
OBJECT_ID('master.dbo.products_list') AS 'Object ID of View';

Object ID of TableObject ID of View
245575913279672044

See also: T-SQL Functions -> APP_NAME | DB_ID | DB_NAME | OBJECT_DEFINITION