数据仓库服务 GaussDB(DWS)-INSERT:语法格式

时间:2023-11-01 16:15:26

语法格式

 1 2 3 4 5 6 7 8 91011121314151617181920212223242526
[ WITH [ RECURSIVE ] with_query [, ...] ]INSERT [ IGNORE | OVERWRITE ] INTO table_name [ AS alias ] [ ( column_name [, ...] ) ]    { DEFAULT VALUES    | VALUES {( { expression | DEFAULT } [, ...] ) }[, ...]     | query }    [ ON DUPLICATE KEY duplicate_action | ON CONFLICT [ conflict_target ] conflict_action ]    [ RETURNING {* | {output_expression [ [ AS ] output_name ] }[, ...]} ];where duplicate_action can be:    UPDATE { column_name = { expression | DEFAULT } |             ( column_name [, ...] ) = ( { expression | DEFAULT } [, ...] )           } [, ...]and conflict_target can be one of:    ( { index_column_name | ( index_expression ) } [ COLLATE collation ] [ opclass ] [, ...] ) [ WHERE index_predicate ]    ON CONSTRAINT constraint_nameand conflict_action is one of:    DO NOTHING    DO UPDATE SET { column_name = { expression | DEFAULT } |                    ( column_name [, ...] ) = ( { expression | DEFAULT } [, ...] )                  } [, ...]              [ WHERE condition ]
support.huaweicloud.com/sqlreference-811-dws/dws_06_0236.html