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

时间:2024-11-13 14:45:59

语法格式

  • 值替换插入。
    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/centralized-devg-v8-gaussdb/gaussdb-42-0672.html