Logo 
Search:

SQL Server Articles

Submit Article
Home » Articles » SQL Server » Meta Data FunctionsRSS Feeds

OBJECT_NAME Function

Posted By: Sarita Patel     Category: SQL Server     Views: 2146

This article explains about OBJECT_NAME function in sql server with examples.

OBJECT_NAME function returns object name of specified object id of database.



Syntax of OBJECT_NAME Function :

OBJECT_NAME ( object_id )

object_id is an identification number of object. It is of type integer.

Return type of OBJECT_NAME function is a nchar.




Examples of OBJECT_NAME Function :

Example 1 : Use of OBJECT_NAME function in select clause

SELECT OBJECT_NAME(917578307)

Output
Customers

Above example returns object name of specified object id of northwind database.
  
Share: 

 
 

Didn't find what you were looking for? Find more on OBJECT_NAME Function Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of OBJECT_NAME Function is from United States.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!