Returns the name of the object with the object ID you specify; can be up to 255 bytes in length.
object_name(object_id[, database_id])
is the object ID of a database object, such as a table, view, procedure, trigger, default, or rule. Object IDs are stored in the id column of sysobjects.
is the ID for a database if the object is not in the current database. Database IDs are stored in the db_id column of sysdatabases.
select object_name(208003772)
------------------------------ titles
select object_name(1, 1)
------------------------------ sysobjects
object_name, a system function, returns the object’s name.
For general information about system functions, see “System functions”.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute object_name.
Functions col_name, db_id, object_id
System procedure sp_help
Copyright © 2005. Sybase Inc. All rights reserved. |