数据仓库服务 GAUSSDB(DWS)-序列:SEQUENCE和NOCACHE

时间:2024-10-26 11:41:26

SEQUENCE和NOCACHE

输入:CREATE SEQUENCE,使用NOCACHE

1
2
3
4
5
CREATE SEQUENCE customers_seq
 START WITH 1000
 INCREMENT BY   1
 NOCACHE
 NOCYCLE;

输出

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
INSERT
     INTO
          PUBLIC.MIG_SEQ_TABLE (
               SCHEMA_NAME
               ,SEQUENCE_NAME
               ,START_WITH
               ,INCREMENT_BY
               ,MIN_VALUE
               ,MAX_VALUE
               ,CYCLE_I
               ,CACHE
               ,ORDER_I
          )
     VALUES (
          UPPER( current_schema ( ) )
          ,UPPER( 'customers_seq' )
          ,1000
          ,1
          ,1
          ,999999999999999999999999999
          ,FALSE
          ,20
          ,FALSE
     )
;
support.huaweicloud.com/tg-dws/dws_mt_0112.html