please help me out in the following code its a syntax error but i don't understand where is the error i tried to run this trigger on Wamp server here is the code:
CREATE TRIGGER Drivers_type_constraint BEFORE INSERT ON Cars
FOR EACH ROW
BEGIN
IF ((NEW.driver_name='null')||(NEW.driver_age<17)) THEN
DELETE from Drivers where driver_id = NEW.driver_id;
END IF;
END;
/
Error
you have an error in your SQL Syntax; Check the manual that correspond to your sql server version for the right syntax to use near '' at line 8
If anyone want to suggest any idea it would be appreciated thanks in advance.
/doing there in line 8? Is it meant as a delimited? Then where is that delimiter defined?