Logo 
Search:

SQL Server Articles

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

OBJECT_ID Function

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

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

OBJECT_ID function returns identification number of specified object of database.



Syntax of OBJECT_ID Function :

OBJECT_ID ('object')

object is a name of database object. It is of type char or nchar.

Return type of OBJECT_ID function is an integer.





Examples of OBJECT_ID Function :

Example 1 : Use of OBJECT_ID function in select clause

SELECT OBJECT_ID('Customers')

Output
917578307

Above example returns object id of customers object in northwind database.
  
Share: 

 
 

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

Sarita Patel
Sarita Patel author of OBJECT_ID 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!