成都公司:成都市成华区建设南路160号1层9号
重庆公司:重庆市江北区红旗河沟华创商务大厦18楼
oracle 字段递增 表插入数据,id自动增1
1、创建表
create table test(id int, name varchar(32)) 2、创建序列 create sequence TID_seq minvalue 1 maxvalue 999999 start with 1 increment by 1 cache 20 ; 3、创建触发器 create or replace trigger test_tri before insert on test for each row begin select to_char(TID_seq.nextval) into :new.id from dual; end test_tri; 4、插入数据 insert into test(name) values ('a') insert into test(name) values ('b') select * from test

