OBJECT_NAME() Metadata Function TSQL Tutorial

Returns the database object name for schema objects.

OBJECT_NAME() Syntax:

OBJECT_NAME ( object_id [, database_id ] )

OBJECT_NAME() Example:

SELECT OBJECT_NAME(279672044) AS 'Object name of View',
OBJECT_NAME(245575913,2) AS 'Object name of Table';

Object name of ViewObject name of Table
products_listproducts

See also: T-SQL Functions -> OBJECT_SCHEMA_NAME | SCHEMA_ID | SCHEMA_NAME