2008-09-22

Check table Existence in SQL

IF OBJECT_ID ('DATABASE_NAME.dbo.TABLE_NAME','U') IS NOT NULL
BEGIN
--do any thing if the table exists
ELSE
--do any thing if the table dose not exists
END
********************************************************************
'U':- Is a symbol for identifying a table in SQL

No comments:

SQL Query Stuff

1 . By using this query can search any string contain within stored procedure, function or view SELECT object_name(id) FROM sys.sysc...