两种方法
方法一:
  用触发器建一个序列
create sequence a_seq increment by 1 start with 100;
建一个触发器, 自动+1
create or replace trigger t_a
before insert on a
for each row
begin
     select s_a.nextval into :new.b from dual;
end;方法二:
  建一个序列
     create sequence a_seq increment by 1 start with 100;
   在语句中+1
  insert into tbl(id,....)
     values (a_seq.nextval,....)

解决方案 »

  1.   

    create sequence seq_name
    increment by 1
    start with 1
    maxvalue 99999999
    nocycle
    cache 10执行:
    insert into table(id,name... )  values(seq_name.nextval,'yourname',...)
      

  2.   

    请问你这些是sql语句吗?这还是要我自己动手(通过执行sql语句)才能把它的数据补上啊。
    这怎么和access和prodox等数据库不一样啊。
    在access数据库中,我们每建一个表时,系统就自动在表的开头添加了“ID”字段,其数据也是每增加一条记录就自动加1。
    可我说的是用户每增加一条记录,oracle9i系统能够自动对“ID”字段的数值加1.
      

  3.   

    oracle里没有那种,不要妄想了,还是自己动手吧