CREATEORREPLACETRIGGER "INSERT_DEPARTMENT" BEFORE inserton "DEPARTMENT" for each row begin select "DEPARTMENT_SEQ".nextval into :NEW.DEPARTMENT_ID from dual; end; / ALTERTRIGGER "INSERT_DEPARTMENT" ENABLE /4 完毕,接下来如果你需要往表格里插入数据,则DEPARTMENT_ID就可以自动增长了。列最小值为1,最大值为9999,而且增加基数为1,这几个值你都可以根据自己的需要进行修改。