Let's say I have a table with 3 columns
table : table 1 rec_no --> primary key ( integer ) product prodlocation
I'll try to do a record shift
update table1 set rec_no = rec_no - 1
--> works fine
update table1 set rec_no = rec_no + 1
--> failed, primary key violation
I understand that we should not manipulate the data if it is part of the primary key.
For discussion sake, any idea why the second query failed ? I think it is acceptable if both queries failed.