这是一个很基本的触发器 CREATE TRIGGER "触发器名称" BEFORE INSERT ON example FOR EACH ROW WHEN (new.id is null) begin select emp_sequence.nextval into: new.id from dual; end 但是就是通不过验证,找了很久才发现错误居然在end后面少加了一个分号,正常的情况是 CREATE TRIGGER "触发器名称" BEFORE INSERT ON example FOR EACH ROW WHEN (new.id is null) begin select emp_sequence.nextval into: new.id from dual; end; 这样,就可以添加触发器了