云数据库 GaussDB-UPDATE:语法格式

时间:2025-02-12 15:06:00

语法格式

 1 2 3 4 5 6 7 8 9101112131415161718
[ WITH [ RECURSIVE ] with_query [, ...] ]UPDATE [/*+ plan_hint */] [ ONLY ] table_name [ * ] [ [ AS ] alias ]SET {column_name = { expression | DEFAULT }     |( column_name [, ...] ) = {( { expression | DEFAULT } [, ...] ) |sub_query }}[, ...]    [ FROM from_list] [ WHERE condition | WHERE CURRENT OF cursor_name ]    [ ORDER BY {expression [ [ ASC | DESC | USING operator ] [ LIMIT row_count ]    [ RETURNING {*                 | {output_expression [ [ AS ] output_name ]} [, ...] }];where sub_query can be:SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]{ * | {expression [ [ AS ] output_name ]} [, ...] }[ FROM from_item [, ...] ][ WHERE condition | WHERE CURRENT OF cursor_name ][ GROUP BY grouping_element [, ...] ][ HAVING condition [, ...] ][ ORDER BY {expression [ [ ASC | DESC | USING operator ] | nlssort_expression_clause ] [ NULLS { FIRST | LAST } ]} [, ...] ][ LIMIT { [offset,] count | ALL } ]
support.huaweicloud.com/distributed-devg-v3-gaussdb/gaussdb-12-0640.html