SoftwareEng
Senior member
Guys,
I need to swap a value in two rows, which is used as a primary key. If you know DB design, you can't have duplicate primary keys, so I'm having to use some temp variables. Is there a way to avoid that and swap in-place or with fewer operations?
(Example: row A has a primary key ItemOrder=1, and row B has a primary key ItemOrder=4. I need to swapm the 1 and 4).
I need to swap a value in two rows, which is used as a primary key. If you know DB design, you can't have duplicate primary keys, so I'm having to use some temp variables. Is there a way to avoid that and swap in-place or with fewer operations?
(Example: row A has a primary key ItemOrder=1, and row B has a primary key ItemOrder=4. I need to swapm the 1 and 4).