Let's say these are the 2 tables:
workers[name, dep_id, salary]
and
department[id, name, city]
How can I achieve to raise the salary of those who work in a particular city?
I'd only know how to do it if the city was in the workers table (then it'd be just UPDATE workers SET salary = salary * 1.1 WHERE city = 'X'
), but it doesn't work when the salary
and city
are in different tables.