declare @index_name varchar(50)
set @index_name = (select name from sys.indexes where name='index_name' AND object_id = object_id('table_name'))
if(@index_name) is not null
begin
drop index table_name.index_name
end
set @index_name = (select name from sys.indexes where name='index_name' AND object_id = object_id('table_name'))
if(@index_name) is not null
begin
drop index table_name.index_name
end
No comments:
Post a Comment