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

     1  drop sequence if exists s1;
     2  create sequence s1 as smallint increment by -40 minvalue 30 maxvalue 100 cycle; 
     3  select nextval('s1');
     4  nextval(s1)
     5  100
     6  select nextval('s1');
     7  nextval(s1)
     8  60
     9  select nextval('s1');
    10  nextval(s1)
    11  100
    12  select currval('s1');
    13  currval(s1)
    14  100
    15  select lastval();
    16  lastval()
    17  100
    18  select setval('s1', 50);
    19  setval(s1, 50)
    20  50
    21  select lastval();
    22  lastval()
    23  50
    24  select nextval('s1');
    25  nextval(s1)
    26  100