Subject Re: [firebird-support] Violation of UNIQUE KEY constraint during UPDATE
Author Milan Babuskov
Helmut Doll wrote:
> UPDATE MY_TABLE SET IX = IX + 1 (if IX is a unique integer key, and
> the table contains a continuous sequence of values for IX)
>
> Isn't there any way at all to shift a sequence of
> unique values with one UPDATE-Statement?

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;

--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org