云数据库 GAUSSDB-REPLACE:语法格式

时间:2024-12-13 17:15:47

语法格式

  • 值替换插入。
    REPLACE [ INTO ] table_name
        [ PARTITION ( partition_name [, ... ] ) ]
        [ ( col_name [, ... ] ) ]
        { VALUES | VALUE } ( value [, ... ] ) [, ... ];
    
    value格式为:
    { expression | DEFAULT }
  • 查询替换插入。
    REPLACE [ INTO ] table_name
        [ PARTITION ( partition_name [, ... ] ) ]
        [ ( col_name [, ... ] ) ]
        query;
  • 设置指定字段值。
    REPLACE [INTO] table_name
        [ PARTITION ( partition_name [, ... ] ) ]
        SET col_name = value [, ... ];
    
    value格式为:
    { expression | DEFAULT }
support.huaweicloud.com/distributed-devg-v8-gaussdb/gaussdb-12-0664.html