Everything seems to be turned of by default in Oracle. That includes returning the details of an error in a sql script.
After finishing a piece of code like a stored proc or trigger, most developers immediately run the script to make sure there are no errors. Unfortunately this is all you'll see with Oracle:
Warning: Trigger created with compilation errors.
There is, fortunately, a way to show the detail of those errors. If you add a "/" to terminate the script and then "show errors;" to the end of you script. You'll see the following instead:
Warning: Trigger created with compilation errors.
Errors for TRIGGER PROJECT_BIU:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/5 PL/SQL: SQL Statement ignored
3/12 PL/SQL: ORA-02289: sequence does not exist
Here's an example:
create or replace trigger PROJECT_BIU
before insert
on PROJECT
referencing old as old new as new
for each row
begin
--create the id
select ProjectNuber_seq.nextval
into :new.Project_Number
from dual;
end;
/
show errors;