Oracle不像Mysql,SQLServer能够直接设置ID自增,但是可以通过触发器实现ID自增. 1 创建测试表 create table t_goods(id number primary key, good_name varchar2(50)); 2 创建序列 create sequence seq_goods_id start with 1 increment by 1; 3 创建触发器 create or replace trigger tr_insert_good before i…