Drop sql table if already exists

 Sometimes the exception "Table or object already exists" comes when we create a table . To avoid this issue we will have to check whether the table is already exists or not. I hope this article would be helpful.


IF OBJECT_ID(N'dbo.Orders',N'U') IS NOT NULL 

DROP TABLE dbo.Orders;

Comments

Popular posts from this blog

Types of Architects

Basic measurements

Search html table contents based on its td using Jquery