i created a data base 'test' with table table 'user', inside the table there are 'id' and 'name' columns
CREATE TABLE `test`.`user` (`id` INT NOT NULL AUTO_INCREMENT , `name` TEXT NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;
now i want to add a constraint so no digits allowed in the 'name' and i don't know how to do it. i'm pretty sure i need to add 'name' NOT LIKE '%[^0-9]%'
but i just can't get it right
i tried ALTER TABLE `test`.`user` ADD CONSTRAINT no_digit_check CHECK ('name' NOT LIKE '%[^0-9]%');
but it gives me an error above 'CHECK' says a new statement was found but no delimiter
thanks