0

I am trying to convert DB2 sequence to MySQL sequence . This is the query i am using in DB

CREATE SEQUENCE MYTEST AS BIGINT START WITH 1 INCREMENT BY 1 MAXVALUE 4611686018427387903 CYCLE CACHE 1000;

Now i want to convert this to MySQL query . I have searched some related question from How do I create a sequence in MySQL?

But how can i use MAXVALUE and CYCLE CACHE in MySQL sequence ? Any suggestion would be helpful .

Ankit Bajpai
  • 13,128
  • 4
  • 25
  • 40
user2986042
  • 1,098
  • 2
  • 16
  • 37
  • 1
    MySQL has no sequences – mustaccio Dec 07 '17 at 14:54
  • Don't worry about cycle cache because if you don't use all the numbers that are cached you loose them leading to gabs in the sequence. Max value is when the sequence restarts normally this is only of value while testing the sequence number to restart. – danny117 Dec 07 '17 at 18:48

0 Answers0