Happy Day. Does anybody know what kind of Generator/Sequence functionality exists in DB2? I'm looking for a way to generate unique integer IDs on the fly >outside of a transaction<. In the past, when a native generator wasn't available, I've used the usual routine of having a table with the next available ID and incrementing it along the way, but there are always multi-user issues. It's easy enough to avoid giving the same ID to two users, but it means transactions have to be extremely short and rollbacks become an issue. Worse, when one of the users goes down mid-transaction things come to a halt. Obviously native generators (or "sequences" in Oraclese) are vastly superior. I've looked through the DB2 help and see nothing that looks like a generator (GENERATE_UNIQUE is a 13-byte string, which will definitely NOT serve my purposes) Am I blind? Cheers. BJ... --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz