The numbers given to invoices entered by the users must be unique and also with not gaps . That means that sequences cannot be usedsince if a transaction rollbacks...
I have a table ( invoiceTypes) that stores various invoice types and for each type its next available number (integer) When I enter a new invoice ( in a table...