0

I need to drop all indexes and constraints and do some processing, after thar I have to apply same indexes and constraints again using MYSql.Please help.

Please suggest if there is some way to store the information/metadata of index created.

1 Answers1

0

Start by disabling all constraints:

 ALTER TABLE my_tbl NOCHECK CONSTRAINT ALL

Primary keys and unique constraints can't be disabled.

Then reenable them again:

 ALTER TABLE my_tbl WITH CHECK CHECK CONSTRAINT ALL
SAS
  • 3,943
  • 2
  • 27
  • 48
  • By the way, is this question regarding tsql or MySQL..? You have tagged with both, but the solution would be different depending on that. – SAS Apr 16 '14 at 07:02