I usually use the following to create objects:
IF EXISTS (SELECT name FROM sysindexes
WHERE name = 'IX_DimDevice_1')
DROP INDEX [IX_DimDevice_1] ON [MedStn].[DimDevice]
GO
I would like to do the same for shema. What is the equivalent of the above statement to delete a schema if it exists?
Start Free Trial