Peggy Baker
0
Q:

phpmyadmin CHECK

BEGIN
    IF (DATEDIFF(CURRENT_DATE(),NEW.birth_date) < 6570) THEN

      -- Throw Exception
      SIGNAL SQLSTATE '45000' 
        SET MESSAGE_TEXT = 'Age is less than 18 years!';

    END IF;  -- A semicolon (delimiter) is missing here
END
0

New to Communities?

Join the community