Update table based on reference values from another table
You need to use an UPDATE statement to do this. Unfortunately SQLite does not support using a JOIN clause in an UPDATE statement so you will have to emulate the JOIN within the WHERE clause like so:

UPDATE Table2
   SET Number = Number + 10
 WHERE (SELECT Value FROM Table1 WHERE Name = Table2.Name1) &gt;
       (SELECT Value FROM Table1 WHERE Name = Table2.Name2);


Similar questions that might also help you:

How do I make an update while joining tables on sqlite

Update with JOIN in sqlite