|
Posted by Andre on 08/21/05 15:19
will try this
thx
(by the way, i mentioned I cannot use identity as it would not preserve
correct order if a middle row is deleted
and it would not allow end-user to change it)
"Hugo Kornelis" <hugo@pe_NO_rFact.in_SPAM_fo> wrote in message
news:6fqgg1d3f7bpim4ct0bril93j6vkedhgek@4ax.com...
> On Sun, 21 Aug 2005 11:02:42 +0200, Andre wrote:
>
> If there are reason's why you can't use IDENTITY, then use
>
> SELECT COALESCE(MAX(code), 0) + 1 AS code
> FROM table
>
Navigation:
[Reply to this message]
|