First I created a table like
CREATE TABLE Customer (
SD integer CHECK (SD > 0),
Last_Name varchar (30),
First_Name varchar(30)
);
Update to MySQL 8.0.16 to use checks
:
As of MySQL 8.0.16, CREATE TABLE permits the core features of table and column CHECK constraints, for all storage engines. CREATE TABLE permits the following CHECK constraint syntax, for both table constraints and column constraints
MySQL Checks Documentation
try with set sql_mode = 'STRICT_TRANS_TABLES'
OR SET sql_mode='STRICT_ALL_TABLES'