Updating dates in an update query
Aggregates cannot be used inside a correlated update statement.
Correlated updates can only use equality predicates to refer to the table being updated.
Correlated updates cannot be performed on tables with referential integrity constraints.
Use an UPDATE statement to add two years to all the order date entries and 12 hours to all the order time entries in the ordertab table.
Note that as there is no WHERE clause, the update applies to all rows: Note the final WHERE clause—without this an attempt would be made to set those prices not specified in the increases table to NULL.
Whether this is possible or not depends up on the definition of the table being updated.
When the record is accessed again, the Date Modified field will contain the date and time of the last modification.In this case, the comment describes a permissible variation of the syntax.Note The feedback system for this content will be changing soon. If content within a comment thread is important to you, please save a copy.Help users increase productivity by automatically signing up for Tech Republic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.
The SELECT clause displays the table before the updates. The FROM clause specifies EMPLOYEES as the table to select from. The UPDATE statement updates the values in EMPLOYEES.
Multiple columns can be updated in a single statement.