How to AUTO_INCREMENT in db2?

前端 未结 4 545
轻奢々
轻奢々 2020-12-05 17:17

I thought this would be simple, but I can\'t seem to use AUTO_INCREMENT in my db2 database. I did some searching and people seem to be using \"Generated by Default\", but t

4条回答
  •  时光说笑
    2020-12-05 17:57

    Added a few optional parameters for creating "future safe" sequences.

    CREATE SEQUENCE 
      START WITH 1
      INCREMENT BY 1
      NO MAXVALUE
      NO CYCLE
      CACHE 10;
    

提交回复
热议问题