Returns the database object name.
OBJECT_NAME(object_id)
nchar
When the parameter to a system function is optional, the current database, host computer, server user, or database user is assumed. Built-in functions must always be followed by parentheses.
System functions can be used in the select list, in the WHERE clause, and anywhere an expression is allowed. For more information, see Expressions and WHERE.
This example returns the OBJECT_NAME for the authors table in the pubs database.
USE pubs
SELECT TABLE_CATALOG, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = OBJECT_NAME(117575457)
Here is the result set:
TABLE_CATALOG TABLE_NAME
------------------------------ --------------
pubs authors
(1 row(s) affected)