diff --git a/_includes/v20.2/sql/diagrams/delete.html b/_includes/v20.2/sql/diagrams/delete.html index 746c3d41e08..bd3969966e2 100644 --- a/_includes/v20.2/sql/diagrams/delete.html +++ b/_includes/v20.2/sql/diagrams/delete.html @@ -1,52 +1,80 @@ -
+
WITH - - -RECURSIVE - - -common_table_expr - -, - - -DELETE - - -FROM - - -table_name - - -opt_index_flags - -AS - - -table_alias_name - -WHERE - - -a_expr - - -sort_clause - - -limit_clause - -RETURNING - - -target_list - -NOTHING - - -
+ + +RECURSIVE + + + +common_table_expr + + + +, + + +DELETE + + +FROM + + +ONLY + + + +table_name + + + + +opt_index_flags + + + +* + + +AS + + + +table_alias_name + + + +WHERE + + + +a_expr + + + + +sort_clause + + + + +limit_clause + + + +RETURNING + + + +target_list + + + +NOTHING + + + +
diff --git a/v20.2/delete.md b/v20.2/delete.md index cdf357d263a..f5aa0df3c11 100644 --- a/v20.2/delete.md +++ b/v20.2/delete.md @@ -37,6 +37,7 @@ table td:first-child { `sort_clause` | An `ORDER BY` clause.

See [Ordering of rows in DML statements](query-order.html#ordering-rows-in-dml-statements) for more details. `limit_clause` | A `LIMIT` clause. See [Limiting Query Results](limit-offset.html) for more details. `RETURNING target_list` | Return values based on rows deleted, where `target_list` can be specific column names from the table, `*` for all columns, or computations using [scalar expressions](scalar-expressions.html).

To return nothing in the response, not even the number of rows updated, use `RETURNING NOTHING`. + `ONLY ... *` | New in v20.2: Supported for compatibility with PostgreSQL table inheritance syntax. This clause is a no-op, as CockroachDB does not currently support table inheritance. ## Success responses diff --git a/v20.2/update.md b/v20.2/update.md index 5f945edf548..60f2423177d 100644 --- a/v20.2/update.md +++ b/v20.2/update.md @@ -36,6 +36,7 @@ Parameter | Description `sort_clause` | An `ORDER BY` clause. See [Ordering Query Results](query-order.html) and [Ordering of rows in DML statements](query-order.html#ordering-rows-in-dml-statements) for more details. `limit_clause` | A `LIMIT` clause. See [Limiting Query Results](limit-offset.html) for more details. `RETURNING target_list` | Return values based on rows updated, where `target_list` can be specific column names from the table, `*` for all columns, or computations using [scalar expressions](scalar-expressions.html).

To return nothing in the response, not even the number of rows updated, use `RETURNING NOTHING`. +`ONLY ... *` | New in v20.2: Supported for compatibility with PostgreSQL table inheritance syntax. This clause is a no-op, as CockroachDB does not currently support table inheritance. ## Force index selection for updates