I have a unique column, and need two rows to swap their values.
Is there a way to make the 2 updates at the same time or do I
have to update one of them to an unused value in the DB then
make the swap?
On Tue, Jul 06, 2010 at 08:08:40PM +0000, Mark wrote:
> I have a unique column, and need two rows to swap their values.
> Is there a way to make the 2 updates at the same time or do I
Can you do that with pure SQL?
> have to update one of them to an unused value in the DB then
> make the swap?
Yes, I think this is the way to go.
Oleg.
--
Oleg Broytman http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.