MySQL Forums
Forum List  »  General

Re: On Delete Restriction
Posted by: Peter Brawley
Date: April 21, 2014 09:37AM

on delete restrict, not 'restriction'.

It's superfluous: "Specifying RESTRICT (or NO ACTION) is the same as omitting the ON DELETE or ON UPDATE clause" (http://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html).

> i want to prevent deleting the manager if the manager has employees.

That's what a foreign key does.

Options: ReplyQuote


Subject
Written By
Posted
April 21, 2014 01:13AM
Re: On Delete Restriction
April 21, 2014 09:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.