Artemka, I think you think exactly the same way as I do...

I have the same thing:
Code:
SELECT NVL(MAX(column_name)+1,1) FROM table_name WHERE <conditions>
Is there any danger of exceeding the limited of the integer datatype for this? What is the maximum value an integer can take? What happens when one exceeds that value?