You can use a CHECK condition to specify that the values in a column must satisfy some definite criterion.
You can apply a CHECK condition to values in a single column, to specify the rules they should follow. These rules may be rules that data must satisfy in order to be reasonable, or they may be more rigid rules that reflect organization policies and procedures.
CHECK conditions on individual column values are useful when only a restricted range of values are valid for that column. Here are some examples:
ALTER TABLE office MODIFY city CHECK ( city IN ( 'city_1', 'city_2', 'city_3' ) )
By default, string comparisons are case insensitive unless the database is explicitly created as a case-sensitive database, using the CASE RESPECT option. See the CASE clause in the CREATE DATABASE statement in Reference: Statements and Options.
ALTER TABLE employee MODIFY start_date CHECK ( start_date BETWEEN '1983/06/27' AND CURRENT DATE )You can use several date formats: the YYYY/MM/DD format used in this example has the virtue of always being recognized regardless of the current option settings.