Wednesday, June 12, 2013

Check if Table Exist :TSQL

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'TABLENAME]') AND OBJECTPROPERTY(id, N'IsTable') = 1)
BEGIN
-- Your code here
END

No comments:

Post a Comment