What is Update Query?

A query that is used to change a record or group of records in one or more tables is update query.

  • For example: It can be used to change in salary by 10% for all employees (or subset of employees) in existing table.
An update query cannot be used to update data in the following types of fields:
  • Calculated fields: The values in calculated fields do not permanently reside in tables. They only exist in the computer's temporary memory after Access calculates them. Because calculated fields do not have a permanent storage location, so these fields cannot be updated.
  • Fields from a totals query or a crosstab query: The values in these types of query are calculated, and therefore cannot be updated by an update query.
  • AutoNumber fields: By design, the values in AutoNumber fields change only when a recorded is added to a table.
  • Fields in unique-values queries and unique-records queries: The values in such queries are summarized. Some of the values represent a single record, and others represent more than one record. The update operation is not possible because it is not possible to determine what records were excluded as duplicates, and therefore not possible to update all the necessary records. This restriction applies whether update query is used to update data manually or try to update by entering values in a form or a datasheet.
  • Fields in a union query: Update query cannot be used to update data from fields in a union query because each record that appears in two or more data sources only appears once in the union query result. Because some duplicate records are removed from the results, Access cannot update all the necessary records.
  • Fields that are primary keys: In some cases, such as if the primary key field is used in a table relationship, update query cannot be used to update the field by using a query unless first the relationship is set to automatically cascade updates.

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.