object_name

Returns the name of the object with the object ID you specify; up to 255 bytes in length.

Syntax

object_name(object_id[, database_id])

Parameters

Examples

Usage

See also:
  • Transact-SQL Users Guide

  • sp_help in Reference Manual: Procedures

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute object_name.

Related reference
col_name
db_id
object_id