OBJECT_ID (Transact-SQL) is database object identification number of a schema-scoped object.
Example, it will drop table test if the table test already exist in the database.
IF OBJECT_ID (N’dbo.test’, N’U') IS NOT NULL
DROP TABLE dbo.test;
GO
Tags: Transact-SQL