I have tried all the combinations of LIKE and NOT LIKE but unable to set a CONSTRAINT for mobile number field, as I want to create table using
CREATE TABLE patient (
pname VARCHAR(20) NOT NULL,
mobNo VARCHAR(15),
CONSTRAINT checkMob CHECK(mobNo NOT LIKE '^[^A-Z]%')
);
but getting error while inserting values, and i want numbers only in mobile number field.