Syntax of UPDATE operator

For editing records in a table exist the SQL operator UPDATE.

General query structure with the UPDATE operator

UPDATE table_name
SET table_field1 = table_field_value1,
    table_fieldN = table_field_valueN
[WHERE the_conditions_of_the_limitations]

In the described request structure, optional parameters are specified in square brackets.

So, for example, if you need to change the name, the request will look like this:

UPDATE FamilyMembers
SET member_name = "Andie Anthony"
WHERE member_name = "Andie Quincey"

Be careful when updating data. If you skip the UPDATE operator, all entries will be updated.

Calculated Values

In data update requests, you can change values based on previous values.

UPDATE Payments
SET unit_price = unit_price * 2

It is also allowed to assign values of some columns to other columns. But at the same time, of course, column types must be compatible.