github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/sequence/sequence.sql (about)

     1  drop sequence if exists s1;
     2  create sequence s1 as smallint increment by -10 minvalue 30 maxvalue 100 cycle; 
     3  select * from s1;
     4  drop sequence if exists s1;
     5  create sequence s1 as bigint unsigned increment by -1000 maxvalue 300;
     6  select * from s1;
     7  drop table s1;
     8  show sequences;
     9  create sequence `序列`;
    10  select nextval('序列');
    11  select nextval('s1'), currval('s1');
    12  create sequence s2;
    13  create table t1(a int);
    14  insert into t1 values(nextval('s2'));
    15  select * from t1;
    16  drop sequence s5;
    17  prepare stmt1 from 'insert into t1 values(?)';
    18  set @a_var = nextval('s2');
    19  execute stmt1 using @a_var;
    20  select * from t1;