Thanks for your reply.
I tried the sequence, and it it works. I thank you for that too
But I have another problem. Some of my friend shared the table with me and it's not possible for everyone of them to change their code shortly. So I use NEXT-VALUE on my own code, not on Database-Trigger.
The problem is when my friend manually add the autonumber using find-last and +1, my sequence will crash on this manually generated auto-number...
e.g.
me using NEXT-VALUE (sequence) get number 100.
friend useing FIND LAST and +1 will get 101.
me using NEXT-VALUE (sequence) get number 101 again......
now what should i do....
PS: CMIIW, each sequence has it's own counter, so if I use the same sequence for several tables it won't keep each table's last counter but will only have one sequence counter.