CREATE OR REPLACE TRIGGER TRIGGER_NAME
BEFORE INSERT OR UPDATE of ON TABLE_NAME
FOR EACH ROW
BEGIN
if inserting then
if :new.col_a < (select col_b from table_a natural join table_b where some_col = :new.some_value)
then
raise_application_error(-20000, 'Raise some error');
end if;
end if;
END;
when I try to compile I get this error
Error(6,93): PLS-00103: Encountered the symbol "JOIN" when expecting one of the following: ) , with group having intersect minus start union where connect The symbol "," was substituted for "JOIN" to continue.
What am I missing?