An oracle-auto_increment, if I hadn't slept all the time in db-lectures
(i.e. "uri"):
create sequence counter_table_uri
increment by 1 start with 1 cache 2;
..then the table, and..
CREATE TRIGGER trigger_primary_key BEFORE INSERT ON uri
REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
Begin
select counter_table_uri.nextval into :NEW.id_xy from DUAL;
End;
/
regards,
alex.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]