I don't quite understand what you want to achieve. Could you possibly explain this in an example?
A sequence is not tied to a table. Therefore, you could get one number from the sequence for table A, another for table B, yet another as input for a UDF, etc. As a consequence, you get gaps in the sequence numbers used for table A only. Maybe IDENTITY columns are a better way to get closer to what you want to do.
Another important aspect is that a transaction may be rolled back. The sequence numbers acquired by that transaction are not reused, of course. So you have even more gaps.
Lastly, if you want to renumber data in a table, you are aware that this would potentially imply updating millions of rows just due to a DELETE on a single row? What should happen in case of dependent rows in other tables? Cascading updates? If the answers would by "yes", you should reconsider your design decisions.
Usually, there is no need to have contiguous sequence numbers in the first place and any application should live with gaps. I would be very intrigued if you have a scenario where you really need that.
IBM DB2 Analytics Accelerator
IBM Germany Research & Development