我正想问这个问题那,
有没有高手知道怎么建自增列啊,一下子开始使用ORACLE觉得很不习惯啊,好多最基本的都不知道怎么设置。

解决方案 »

  1.   

    SQL> create sequence test_seq
      2  minvalue 1
      3  maxvalue 1.0E27
      4  start with 1309001111921
      5  increment by 1;Sequence createdSQL>
      

  2.   

    SQL> column test_col format a20;
    SQL> select test_seq.nextval test_col from dual;            TEST_COL
    --------------------
           1309001111923SQL>
      

  3.   

    Enterprize Console里用菜单建立好啦
      

  4.   

    用自增序列的值插入到你要用做序列的那列中就可以了insert into tablename(自增序列) values(test_seq.nextval);