How to drop Constraints from all table at once in a database

How to drop Constraints from all table at once in a database

Post by Bhingare, » Wed, 21 Nov 2007 03:58:49


Does anyone know how to drop constarints from all the table of a
databse .. i am using hibernate with Mysql..evertime I run my programm
the constraints gets added

..& i need to remove them manully going to each table..to insert data
into tables quickly..

please do let me know if any one know who to drop constrains at once
from all the tables in a database

your feedback would be of greate help

Thanks
Ashwini
 
 
 

How to drop Constraints from all table at once in a database

Post by Rik Wasmu » Wed, 21 Nov 2007 04:05:28

On Mon, 19 Nov 2007 19:58:49 +0100, Bhingare, Ashwini



Well, should the constraints exist or be permanently removed?


http://www.yqcomputer.com/

mysql> SET FOREIGN_KEY_CHECKS = 0;
mysql> ...queries here...
mysql> SET FOREIGN_KEY_CHECKS = 1;

--
Rik Wasmus