Access UPDATE Syntax Guide
The UPDATE statement in access is used to update data in a table. Its basic syntax is as follows:
Update the specified table by setting the values of the columns and satisfying the conditions.
Among them,
- table_name is the name of the table where the data will be updated.
- column1, column2, and so on are the names of the columns to be updated with data.
- Value1, value2, etc. are the values to be updated.
- The condition serves as the updating criteria, only the data that meets this condition will be updated.
Suppose there is a table named “students” with columns such as id, name, and age.
To update the name of the student with an id of 1 to “John” and the age to 20, you can use the following UPDATE statement:
Update the student record with ID 1 to change the name to ‘John’ and the age to 20.
After executing this statement, the name and age of the student with ID 1 will be updated to “John” and 20.