Check out example codes for "Insert and initialize a SQL column with value dependent on another column data". It will help you in understanding the concepts better.

Code Example 1

UPDATE table
SET col = new_value
WHERE col = old_value
AND other_col = some_other_value;

UPDATE table
SET col = new_value
WHERE col = old_value
OR other_col = some_other_value;

Learn ReactJs, React Native from akashmittal.com