加个序列就ok了csdn的老贴很多,搜一下:http://community.csdn.net/Expert/ForumList_Search.asp?searchtype=2&bigclassid=61&smallclassid=6101&searchKeys=%D0%F2%C1%D0&author=&tabletype=now&Submit2=%B6%D4%D1%A1%D4%F1%B5%C4%D0%A1%C0%E0%BD%F8%D0%D0%CB%D1%CB%F7

解决方案 »

  1.   

    create or replace sequence seq
      increment by 1
      start with 1
      maxvalue 100
      minvalue 1
      nocycle
      nocache;
      

  2.   

    maxvalue 可能要10W了,否则马上就暴了那个seq.nextval怎么用啊,我刚刚上手。。不懂的说。。呵呵
      

  3.   

    创建序列的话,可以达到上亿,不用担心用完哦,而且可以循环使用。
    首先创建create or replace sequence seq
      increment by 1
      start with 1
      maxvalue 999999999999999999  minvalue 1 nocycle; 够不?^_^
    使用的时候,在插入数据的时候 insert into webtime values (seq.nextval,**,**);即可完成自动加一的功能