|
This SQL statement can be executed in the following ways: |
Through the CA Datacom Datadictionary Interactive SQL Service Facility (interactive) |
In an application program prepared using a CA Datacom/DB SQL Preprocessor (embedded) |
By using CA Dataquery (SQL & Batch Modes) |
|---|---|---|---|
|
UPDATE (positioned) |
|
YES |
|
|
UPDATE (searched) |
YES |
YES |
YES |
Note: YES indicates a valid execution method for this statement. To learn about using SQL keywords in CA Dataquery, see the CA Dataquery User Guide. For information about the access rights required to execute this statement, see the CA Datacom/DB Database and System Administration Guide.
The UPDATE statement updates the values of specified columns in rows of a table or view. Updating a row of a view updates a row of the base table from which the view is derived.
You must specify ISOLEVEL=C (isolation level C) in the Preprocessor options when using the UPDATE statement.
Note: When the NOMAINT option of the CA Datacom/DB Utility (DBUTLTY) ACCESS function is in force, an UPDATE statement receives a CA Datacom/DB return code 94(87), where 87 is a decimal internal return code (hex 57) that tells you no maintenance statements are allowed while NOMAINT is in force.
Also note that constraints that existed in versions before r10 can act differently in Release 10.0 and above because, in Release 10.0 and above, columns containing a NULL rather than a value do not cause a CHECK constraint to be violated. Constraints are considered, in Release 10.0, to be satisfied unless the predicates evaluate explicitly to FALSE. That is, CHECK constraints whose predicates evaluate to UNKNOWN rather than TRUE or FALSE are considered, starting with Release 10.0, to have been satisfied. Therefore, INSERT and UPDATE statements, from versions before r10, that resulted in constrained columns being nulled are, when used in Release 10.0 and above, successful for the first time.
Following is the syntax diagram for an UPDATE statement:
►►─┬─ searched UPDATE ───┬────────────────────────────────────────────────────►◄ └─ positioned UPDATE ─┘
Note: The positioned UPDATE is not used by CA Dataquery.
|
Copyright © 2014 CA.
All rights reserved.
|
|