My table looks like this:
id city road_id
-------------------------
1 london 3
2 manchester 3
3 newcastle 3
4 glasgow 3
5 london 5
6 newcastle 5
I know values of two cities and road_id and need something like this:
UPDATE table SET anothercolumn=1 WHERE id>=(id for)london AND id<(id for)glasgow AND road_id=3
to affect only these rows:
1 london 3
2 manchester 3
3 newcastle 3