Re: How to implement this constraint
MySQL has only a few simple "CONSTRAINTs"; your request is too complex. Do it in your application code.
Meanwhile, you should probably have one table for balls:
id ...
color ENUM('red', 'green', 'blue') NOT NULL,
data ...,
red_only ... NULL -- stuff that applies only to RED balls.
Subject
Written By
Posted
Re: How to implement this constraint
July 26, 2015 08:48AM
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.