|
Posted by --CELKO-- on 10/05/07 03:36
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. If you know how, follow ISO-11179 data element naming
conventions and formatting rules.
>> How might someone write a procedure to get the next lowest number in this sequence? In this case it would be: 4. <<
No; read your own specs! The answer is -1. Or maybe -0.0000...1 if
the column is a DECIMAL or a FLOAT. If you had posted DDL that
limited the column to non-negative integers, then Dave's answer would
work.
[Back to original message]
|