Search code examples
oracle-databaseoracle11goracle-apexsequences

How to call or create two sequences in one TABLE of Oracle APEX 4.1


I have made two sequences, Vendor_Id and Vendor_ReferenceNo, for the table Vendor. I want to call or add both the sequences in Vendor table. But APEX 4.1 only gives the option of one sequence per table. Is there any other method?


Solution

  • If you really need to do this (as @APC mentioned in the comment, this is usually a sign of a flawed design), you can create a trigger on the table that selects from the second sequence and sets the corresponding column.