Tried to create following trriger:
CREATE TRIGGER EWR.INS_STU
AFTER INSERT ON EWR.STUDENT
FOR EACH ROW
BEGIN
IF ( :NEW.ROLL_NO > 60 ) THEN
INSERT INTO EWR.STUDENT_DIV VALUES ( :NEW.ROLL_NO,'P');
END IF;
IF( :NEW.ROLL_NO < 60)
THEN
INSERT INTO EWR.STUDENT_DIV VALUES (:NEW.ROLL_NO,'F');
END IF;
END
!
But it is giving the following error:
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0104N An unexpected token ":NEW.ROLL_NO > 30 ) THEN INSERT INT" was found following "H ROW BEGIN IF (". Expected tokens may include:
"". LINE NUMBER=6. SQLSTATE=42601SQL0104N An unexpected token ":NEW.ROLL_NO > 30 ) THEN INSERT INT" was found following "H ROW BEGIN IF (". Expected tokens may include: "".