Files
dolthub--doltgresql/testing/generation/command_docs/synopses/insert.txt
T
2026-07-13 12:32:25 +08:00

28 lines
1.4 KiB
Plaintext

[ WITH [ RECURSIVE ] $with_query$ [ , ... ] ] INSERT INTO $table_name$ [ AS $alias$ ] DEFAULT VALUES
[ ON CONFLICT [ $conflict_target$ ] $conflict_action$ ]
[ RETURNING { * | { $output_expression$ [ [ AS ] $output_name$ ] } [ , ... ] } ]
[ WITH [ RECURSIVE ] $with_query$ [ , ... ] ] INSERT INTO $table_name$ [ AS $alias$ ] [ ( $column_name$ [ , ... ] ) ]
{ VALUES ( { $expression$ | DEFAULT } [ , ... ] ) [ , ... ] | $query$ }
[ ON CONFLICT [ $conflict_target$ ] $conflict_action$ ]
[ RETURNING { * | { $output_expression$ [ [ AS ] $output_name$ ] } [ , ... ] } ]
[ WITH [ RECURSIVE ] $with_query$ [ , ... ] ] INSERT INTO $table_name$ [ AS $alias$ ] [ ( $column_name$ [ , ... ] ) ]
OVERRIDING { SYSTEM | USER } VALUE { $sub-SELECT$ | ( $sub-SELECT$ ) }
[ ON CONFLICT [ $conflict_target$ ] $conflict_action$ ]
[ RETURNING { * | { $output_expression$ [ [ AS ] $output_name$ ] } [ , ... ] } ]
where $conflict_target$ is:
( { { $index_column_name$ | ( $index_expression$ ) } [ COLLATE $collation$ ] [ $opclass$ ] } [ , ... ] ) [ WHERE $index_predicate$ ] |
ON CONSTRAINT $constraint_name$
where $conflict_action$ is:
DO NOTHING |
DO UPDATE SET { $column_name$ = { $expression$ | DEFAULT } |
( $column_name$ [ , ... ] ) = [ ROW ] ( { $expression$ | DEFAULT } [ , ... ] ) |
( $column_name$ [ , ... ] ) = ( $sub-SELECT$ )
} [ , ... ]
[ WHERE $condition$ ]