Tuesday, 24 July 2012

Delete and Update cascading constraint in existing table


ALTER TABLE `emp_details` ADD
   CONSTRAINT `foreign_key_const`
   FOREIGN KEY (`emp_id`) REFERENCES `employee` (`emp_id`)
   ON DELETE CASCADE ON UPDATE CASCADE

No comments:

Post a Comment