During an update operation, if InsertCommand is not set and primary key information is present in the DataSet , you can use the OracleCommandBuilder class to automatically generate InsertCommand , and additional commands needed to reconcile the DataSet to the database.
The generation logic also requires key column information to be present in the DataSet. For more information see Generating Commands with CommandBuilders.
If execution of this command returns rows, these rows may be merged with the DataSet depending upon how you set the UpdatedRowSource property of the OracleCommand object. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. If no default value for the corresponding column has been specified, then the database sets the column to null.
If you omit this clause, then the database updates all rows in the table or view. Please refer to Chapter 7, "Conditions" for the syntax of condition. The expressions are evaluated as the row is updated. The returning clause retrieves the rows affected by a DML statement.
You can specify this clause for tables and materialized views and for views with a single base table. The following statement increases the salary of an employee in the employees table on the remote database:. Updating a Partition: Example The following example updates values in a single partition of the sales table:.
Correlated Update: Example For an example that uses a correlated subquery to update nested table rows, please refer to "Table Collections: Examples". The following example shows that you can specify a single-set aggregate function in the expression of the returning clause:. That usage is now deprecated. See Also: "Correlated Update: Example".
Note: If you insert string literals into a RAW column, then during subsequent queries, Oracle Database will perform a full table scan rather than using any index that might exist on the RAW column. The subquery must return exactly one row that includes all the columns listed.
The column values returned by the subquery are assigned to the columns in the column list in order. The first value is assigned to the first column in the list, the second value is assigned to the second column in the list, and so on. Any valid SQL expression. Chooses which rows to update in the database table.
0コメント