http://expert.csdn.net/Expert/topic/1188/1188814.xml?temp=3.622073E-02

解决方案 »

  1.   

    http://expert.csdn.net/Expert/topic/1188/1188814.xml?temp=.3385431
      

  2.   

    这在SQL server 中为自增列,Oracle中为序列
       create sequence nextnumber 
             start   with 1
             incrementy by 1
             minvalue      1
             maxvalue      1000000
             cache       20
             cycle
             order;
      

  3.   

    用序列
    create sequence SQ_ID
    minvalue 1
    maxvalue 999999999999999999999999999
    start with 1
    increment by 1
    cache 20;
      

  4.   

    怎么样让某一列使用“序列”呢?我看了oracle的书提到了序列这个概念,可是不会用,sqlserver中的类似功能可以在建表时指定某一列的类型为identify,oracle中怎么办呢?
      

  5.   

    CREATE SEQUENCE sequence_name
      START WITH 1
      INCREMENT BY 1
      MINVALUE 1
      MAXVALUE 9999999
      CACHE 20
      CYCLE;INSERT INTO table_name (col_name)
      VALUES (sequence_name.NEXTVAL);