Progress
SQL-92
Guide and Reference
UPDATE Statement
Updates the rows and columns of the specified table with the given values for rows that satisfy the search_condition. This is the syntax for the UPDATE statement:
SYNTAX
assignment:
NOTES
EXAMPLES
- If you specify the optional
WHERE
clause, only rows that satisfy the search_condition are updated. If you do not specify aWHERE
clause all rows of the table are updated.- If the expressions in the
SET
clause are dependent on the columns of the target table, the expressions are evaluated for each row of the table.- If a query expression is specified on the right_hand side of an assignment, the number of expressions in the first
SELECT
clause of the query expression must be the same as the number of columns listed on the left_hand side of the assignment.- If a query expression is specified on the right_hand side of an assignment, the query expression must return one row.
- If a table has check constraints and if the columns to be updated are part of a check expression, then the check expression is evaluated. If the result of the evaluation is FALSE, the
UPDATE
statement fails.- If a table has primary or candidate keys and if the columns to be updated are part of the primary or candidate key, SQL checks to determine if there is a corresponding row in the referencing table. If there is a corresponding row the
UPDATE
operation fails.
AUTHORIZATION
Must have DBA privilege or UPDATE privileges on all the specified columns of the target table, and SELECT privilege on all the other tables referred to in the statement.
SQL COMPLIANCE
SQL-92. ODBC Extended SQL grammar. Progress Extensions: assignments of the form
( column , column , ... ) = ( expr , expr , ... )ENVIRONMENT
Embedded SQL, interactive SQL, ODBC applications, JDBC applications
RELATED STATEMENTS
SELECT Statement, OPEN Statement, FETCH Statement, "Search Conditions" and "Query Expressions" in "SQL-92 Language Elements"
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |