Hi, not sure if this is what you are asking, but in Oracle, you would want to create a sequence, lets call it id_seq, and you would insert id_seq.nextval into the table, which would always return the next unique ticket number. Check the oradocs on sequences, should be no prob.
made an excellent point about wasting empty rows in the main table and transactional support. I would handle this by first popping the top value off of the sequence with something like
and storing that in your script, and only inserting that value into the database when the user "stumbits" the ticket.
In reply to Re: Last ID
by malloc
in thread Last ID
by qball