I have read Database system concepts, 6th edition, Silberschatz. I\'m going to implement the university database system shown in chapter 2 on OS X
Below code worked for me
set @@foreign_key_checks=0; ALTER TABLE `table1` ADD CONSTRAINT `table1_fk1` FOREIGN KEY (`coloumn`) REFERENCES `table2` (`id`) ON DELETE CASCADE;