Trigger is your only option in Oracle.
Printable View
Trigger is your only option in Oracle.
You'd use a sequence, rather than a "counter table" ... something like ...
Code:create sequence my_seq;
Create or Replace Trigger
BIR_MY_TABLE
Before Insert On MY_TABLE
For Each Row
Begin
Select my_seq.nextval
Into :new.MY_TABLE#
From Dual;
End;
/