The syntax of the OBJECT_ID function : OBJECT_ID « System Settings « SQL Server / T-SQL Tutorial






OBJECT_ID('object')

The syntax of the DB_ID function 
DB_ID('database')








26.21.OBJECT_ID
26.21.1.The syntax of the OBJECT_ID function
26.21.2.Code that tests for the existence of a temporary table
26.21.3.SELECT object_id('employee')
26.21.4.Check existance of a view by using OBJECT_ID
26.21.5.Use OBJECT_ID in insert statement