Subject | Re: Violation of UNIQUE KEY constraint during UPDATE |
---|---|
Author | Helmut Doll |
Post date | 2005-08-05T15:59:41Z |
--- In firebird-support@yahoogroups.com, Milan Babuskov <albis@e...>
wrote:
Thanks for your advice.
Actually, I already thought of that possibility myself (after all, the
integer domain is large enough to find an unoccupied index range in
all realistic cases), I just hoped there would be a more "elegant"
solution (like some modifier to the update statement that would
determine the execution order).
Helmut
wrote:
>Hello Milan,
> With one, no. But you could try with two. Suppose that you have some
> large values (ex. 10000+) that aren't taken:
>
> update my_table set ix = ix + 10001;
> update my_table set ix = ix - 10000;
>
Thanks for your advice.
Actually, I already thought of that possibility myself (after all, the
integer domain is large enough to find an unoccupied index range in
all realistic cases), I just hoped there would be a more "elegant"
solution (like some modifier to the update statement that would
determine the execution order).
Helmut