Is there a way to predefine the values I want to be inserted in my table? I mean, for example I have this structure of the table
column1 | column2 | column3
| |
| |
| |
And I know that my column3 should contain only values for example YES
, NO
, and MAYBE
is there a way to define that in sql level, or the only way is to do it programatically?
To be more precise, I'm looking for something that will throw a database level exception if I insert a value that does not fall into my predefined range
P.S. I'm using a MySql database