On Android I’m using rawQuery() to run this query against one of my tables:
UPDATE Icons SET position = position - 1 WHERE position <= 4 AND position > 1
When I look at the database afterwards in ADB the result I see looks like this, where the second column is the position column:
0|0
1|4
2|2
3|3
4|4
5|5
6|6
7|7
8|8
9|9
10|10
11|11
12|12
13|13
14|14
When I run the same query in ADB, all the rows are correctly updated instead of just one
0|0
1|3
2|1
3|2
4|3
5|5
6|6
7|7
8|8
9|9
10|10
11|11
12|12
13|13
14|14
Any ideas why this is happening or how I can fix it?
rawQuery doesn’t support updates, use execSQL instead