First I created a table like
CREATE TABLE Customer (
SD integer CHECK (SD > 0),
Last_Name varchar (30),
First_Name varchar(30)
);
Check constraints are supported as of version 8.0.15 (yet to be released)
https://bugs.mysql.com/bug.php?id=3464
[23 Jan 16:24] Paul Dubois
Posted by developer: Fixed in 8.0.15.
Previously, MySQL permitted a limited form of CHECK constraint syntax, but parsed and ignored it. MySQL now implements the core features of table and column CHECK constraints, for all storage engines. Constraints are defined using CREATE TABLE and ALTER TABLE statements.