T-SQL OBJECT_ID()

The OBJECT_ID() metadata function returns the database object id number of a schema object.
The objects can be tables, views, constraints.
The value returned by the object_id() function is stored in the system view sys.all_objects, in the column object_id.

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