Monday, 15 February 2016

MSSQL - Check if index exists and if exists - delete it

Watch this example on YouTube



IF Exists(Select * FRom sys.indexes where name = 'IX_Customers' and object_Id = object_id('[Customers]') )
BEgin
    Drop Index IX_Customers on Customers
end

No comments:

Post a Comment