>Hi,
>
>What is the syntax for dropping an index possibly used in a foreign key constraint? I have a table that has a unique index key. When I try to remove it using the following syntax:
>
>
>use [MyDatabase]
>drop index [IX_field_name] on TableName
>
>
>I get message that
>
>An explicit DROP INDEX is not allowed on index 'TableName.IX_field_name'. It is being used for FOREIGN KEY
>constraint enforcement.
>
>
>I have removed all FK constraint on this field in other/child tables. So it must be something in this TableName. If not, how do I find out what foreign key is using this index key?
>
>TIA.
Find the constraint name and use DROP CONSTRAINT command.
If it's not broken, fix it until it is.
My Blog