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

     1  create sequence alter_seq_01  as smallint;
     2  show sequences;
     3  Names    Data Type
     4  alter_seq_01    SMALLINT
     5  alter sequence alter_seq_01 as bigint;
     6  show sequences;
     7  Names    Data Type
     8  alter_seq_01    BIGINT
     9  select nextval('alter_seq_01'),currval('alter_seq_01');
    10  nextval(alter_seq_01)    currval(alter_seq_01)
    11  1    1
    12  alter sequence alter_seq_01 minvalue 1 maxvalue 100;
    13  select nextval('alter_seq_01'),currval('alter_seq_01');
    14  nextval(alter_seq_01)    currval(alter_seq_01)
    15  2    2
    16  select nextval('alter_seq_01'),currval('alter_seq_01');
    17  nextval(alter_seq_01)    currval(alter_seq_01)
    18  3    3
    19  select nextval('alter_seq_01'),currval('alter_seq_01');
    20  nextval(alter_seq_01)    currval(alter_seq_01)
    21  4    4
    22  alter sequence alter_seq_01 cycle;
    23  select * from alter_seq_01;
    24  last_seq_num    min_value    max_value    start_value    increment_value    cycle    is_called
    25  5    1    100    4    1    true    false
    26  select nextval('alter_seq_01'),currval('alter_seq_01');
    27  nextval(alter_seq_01)    currval(alter_seq_01)
    28  5    5
    29  select nextval('alter_seq_01'),currval('alter_seq_01');
    30  nextval(alter_seq_01)    currval(alter_seq_01)
    31  6    6
    32  select nextval('alter_seq_01'),currval('alter_seq_01');
    33  nextval(alter_seq_01)    currval(alter_seq_01)
    34  7    7
    35  alter sequence alter_seq_01 maxvalue 1000;
    36  alter sequence alter_seq_01 increment by 10;
    37  select nextval('alter_seq_01'),currval('alter_seq_01');
    38  nextval(alter_seq_01)    currval(alter_seq_01)
    39  8    8
    40  select nextval('alter_seq_01'),currval('alter_seq_01');
    41  nextval(alter_seq_01)    currval(alter_seq_01)
    42  18    18
    43  select nextval('alter_seq_01'),currval('alter_seq_01');
    44  nextval(alter_seq_01)    currval(alter_seq_01)
    45  28    28
    46  alter sequence alter_seq_01 start with 900;
    47  select nextval('alter_seq_01'),currval('alter_seq_01');
    48  nextval(alter_seq_01)    currval(alter_seq_01)
    49  910    910
    50  select nextval('alter_seq_01'),currval('alter_seq_01');
    51  nextval(alter_seq_01)    currval(alter_seq_01)
    52  920    920
    53  select nextval('alter_seq_01'),currval('alter_seq_01');
    54  nextval(alter_seq_01)    currval(alter_seq_01)
    55  930    930
    56  drop sequence alter_seq_01;
    57  create sequence if not exists alter_seq_01 as bigint increment by 100 minvalue 20  start with 50 cycle;
    58  select * from alter_seq_01;
    59  last_seq_num    min_value    max_value    start_value    increment_value    cycle    is_called
    60  50    20    9223372036854775807    50    100    true    false
    61  select nextval('alter_seq_01'),currval('alter_seq_01');
    62  nextval(alter_seq_01)    currval(alter_seq_01)
    63  50    50
    64  select nextval('alter_seq_01'),currval('alter_seq_01');
    65  nextval(alter_seq_01)    currval(alter_seq_01)
    66  150    150
    67  select nextval('alter_seq_01'),currval('alter_seq_01');
    68  nextval(alter_seq_01)    currval(alter_seq_01)
    69  250    250
    70  alter sequence if exists alter_seq_01 as int increment by 200 minvalue 10 no cycle;
    71  select * from alter_seq_01;
    72  last_seq_num    min_value    max_value    start_value    increment_value    cycle    is_called
    73  450    10    2147483647    250    200    false    false
    74  select nextval('alter_seq_01'),currval('alter_seq_01');
    75  nextval(alter_seq_01)    currval(alter_seq_01)
    76  450    450
    77  select nextval('alter_seq_01'),currval('alter_seq_01');
    78  nextval(alter_seq_01)    currval(alter_seq_01)
    79  650    650
    80  select nextval('alter_seq_01'),currval('alter_seq_01');
    81  nextval(alter_seq_01)    currval(alter_seq_01)
    82  850    850
    83  drop sequence alter_seq_01;
    84  create sequence alter_seq_02 increment 3;
    85  select nextval('alter_seq_02');
    86  nextval(alter_seq_02)
    87  1
    88  select nextval('alter_seq_02'),currval('alter_seq_02');
    89  nextval(alter_seq_02)    currval(alter_seq_02)
    90  4    4
    91  select * from alter_seq_02;
    92  last_seq_num    min_value    max_value    start_value    increment_value    cycle    is_called
    93  4    1    9223372036854775807    1    3    false    true
    94  alter sequence alter_seq_02 increment 10;
    95  select nextval('alter_seq_02'),currval('alter_seq_02');
    96  nextval(alter_seq_02)    currval(alter_seq_02)
    97  14    14
    98  select nextval('alter_seq_02'),currval('alter_seq_02');
    99  nextval(alter_seq_02)    currval(alter_seq_02)
   100  24    24
   101  alter sequence alter_seq_02 increment by -10;
   102  select nextval('alter_seq_02');
   103  nextval(alter_seq_02)
   104  14
   105  select nextval('alter_seq_02'),currval('alter_seq_02');
   106  nextval(alter_seq_02)    currval(alter_seq_02)
   107  4    4
   108  select nextval('alter_seq_02'),currval('alter_seq_02');
   109  internal error: Reached maximum value of sequence alter_seq_02
   110  drop sequence alter_seq_02;
   111  create sequence alter_seq_03 start 10000;
   112  select nextval('alter_seq_03');
   113  nextval(alter_seq_03)
   114  10000
   115  select nextval('alter_seq_03'),currval('alter_seq_03');
   116  nextval(alter_seq_03)    currval(alter_seq_03)
   117  10001    10001
   118  alter sequence alter_seq_03 minvalue 999 maxvalue 1999;
   119  invalid input: STARTVALUE (10001) for sequence must between MINVALUE (999) and MAXVALUE (1999)
   120  alter sequence alter_seq_03;
   121  SQL syntax error: synatx error, alter_seq_03 has nothing to alter
   122  alter sequence alter_seq_03 start 9999;
   123  select nextval('alter_seq_03'),currval('alter_seq_03');
   124  nextval(alter_seq_03)    currval(alter_seq_03)
   125  10002    10002
   126  select nextval('alter_seq_03'),currval('alter_seq_03');
   127  nextval(alter_seq_03)    currval(alter_seq_03)
   128  10003    10003
   129  drop sequence alter_seq_03;
   130  create sequence alter_seq_04 start 9;
   131  select nextval('alter_seq_04'),currval('alter_seq_04');
   132  nextval(alter_seq_04)    currval(alter_seq_04)
   133  9    9
   134  select nextval('alter_seq_04'),currval('alter_seq_04');
   135  nextval(alter_seq_04)    currval(alter_seq_04)
   136  10    10
   137  alter sequence alter_seq_04 minvalue 10 maxvalue 10 no cycle;
   138  invalid input: MAXVALUE (10) of sequence must be bigger than MINVALUE (10) of it
   139  select * from alter_seq_04;
   140  last_seq_num    min_value    max_value    start_value    increment_value    cycle    is_called
   141  10    1    9223372036854775807    9    1    false    true
   142  select nextval('alter_seq_04'),currval('alter_seq_04');
   143  nextval(alter_seq_04)    currval(alter_seq_04)
   144  11    11
   145  drop sequence alter_seq_04 ;
   146  create sequence alter_seq_05 increment 2 minvalue 1 maxvalue 6 no cycle;
   147  select nextval('alter_seq_05'),currval('alter_seq_05');
   148  nextval(alter_seq_05)    currval(alter_seq_05)
   149  1    1
   150  select nextval('alter_seq_05'),currval('alter_seq_05');
   151  nextval(alter_seq_05)    currval(alter_seq_05)
   152  3    3
   153  alter sequence alter_seq_05 increment 2 minvalue 1 maxvalue 6 cycle;
   154  select nextval('alter_seq_05'),currval('alter_seq_05');
   155  nextval(alter_seq_05)    currval(alter_seq_05)
   156  5    5
   157  select nextval('alter_seq_05'),currval('alter_seq_05');
   158  nextval(alter_seq_05)    currval(alter_seq_05)
   159  1    1
   160  select nextval('alter_seq_05'),currval('alter_seq_05');
   161  nextval(alter_seq_05)    currval(alter_seq_05)
   162  3    3
   163  select * from alter_seq_05;
   164  last_seq_num    min_value    max_value    start_value    increment_value    cycle    is_called
   165  3    1    6    3    2    true    true
   166  create sequence alter_seq_06 increment 20 minvalue 140 maxvalue 200 no cycle;
   167  select nextval('alter_seq_06'),currval('alter_seq_06');
   168  nextval(alter_seq_06)    currval(alter_seq_06)
   169  140    140
   170  select nextval('alter_seq_06'),currval('alter_seq_06');
   171  nextval(alter_seq_06)    currval(alter_seq_06)
   172  160    160
   173  alter sequence alter_seq_06 maxvalue 220;
   174  select nextval('alter_seq_06'),currval('alter_seq_06');
   175  nextval(alter_seq_06)    currval(alter_seq_06)
   176  180    180
   177  select nextval('alter_seq_06'),currval('alter_seq_06');
   178  nextval(alter_seq_06)    currval(alter_seq_06)
   179  200    200
   180  select nextval('alter_seq_06'),currval('alter_seq_06');
   181  nextval(alter_seq_06)    currval(alter_seq_06)
   182  220    220
   183  select nextval('alter_seq_06'),currval('alter_seq_06');
   184  internal error: Reached maximum value of sequence alter_seq_06
   185  alter sequence alter_seq_02 increment by -10;
   186  invalid input: no such sequence alter_seq_02