- I want to delete some duplicate data in one table.Here every table is related to some other table.So i want to disable all constraints on all tables.After deleting the duplicate data i want to enable the constraints* I tried so many solutions but no one working properly.Please help me out
Asked
Active
Viewed 692 times
0

Anusha Nilapu
- 1,243
- 8
- 24
- 36
-
1http://stackoverflow.com/questions/14972816/how-to-disable-constraints-for-all-the-tables-and-enable-it – shivam Jan 25 '14 at 07:25
1 Answers
0
I did Step 1:first go to edit ->preferences->sql-editor In Query editor disable the ‘safe updates...’
Step 2:close mysql workbench
Step 3:Open mysql workbench SET foreign_key_checks = 0;
Step 4:delete the records which are not deleting due to constraints previously
Step 5:SET foreign_key_checks = 1;
Step 6:go to edit ->preferences->sql-editor In Query editor enable the ‘safe updates...’
Step 7:Close and Open mysql workbench
It works for me

Anusha Nilapu
- 1,243
- 8
- 24
- 36