0
CREATE TABLE emp3(
   id int(3) auto_increment,
   first_name varchar(30) NOT NULL,
   last_name varchar(30), 
   email varchar(20) not null unique,
   PRIMARY KEY (id)
);

ALTER TABLE emp3 ADD CONSTRAINT check_name_not_blank CHECK ((first_name<>'')), ADD CONSTRAINT check_email_not_blank CHECK ((email<>''))

check constraint is not working in mysql.so how can i use this condition in a stored procedure so as to avoid empty strings?

4

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.