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<>''))
检查约束在mysql
中无效。那么如何在stored procedure
中使用此条件以避免空字符串?