N
UPDATE tableName SET anAttribute = 'Something' WHERE anOtherAttribute = 'SomethingElse'
//All 'SomethingElse' values will become 'Something'
N
-- Things in brackets are optional
-- IGNORE modifier updates rows even if errors occur (ie: the rows that cause errors are simply not updated)
UPDATE [IGNORE] table_name
SET
column_name1 = expr1,
column_name2 = expr2,
...
[WHERE
condition]; -- WHERE tells us which rows to update based on said condition
N
UPDATE t1
SET t1.COL1 = t2.COL1, t1.COL2 = t2.COL2
FROM MY_TABLE AS t1
INNER JOIN MY_OTHER_TABLE AS t2 ON t1.COLID = t2.ID
WHERE t1.COL3 = 'OK';
N
UPDATE employees
SET
email = '[email protected]'
WHERE
employeeNumber = 1056;Code language: SQL (Structured Query Language) (sql)