DELIMITER $$
CREATE TRIGGER example
BEFORE INSERT ON dates FOR EACH ROW
BEGIN
declare age int;
IF ((set age = AND (select * , year(curdate())-year(dob) ) < 18)
THEN
CALL `'Cannot add or update row: only one active row allowed per type'`;
END IF;
END;
$$
暂无答案!
目前还没有任何答案,快来回答吧!