Oracle - PK field auto increment
Posted on 2004-04-22
I am new to Oracle and I read that to implement auto increment on a field such needs to be done.
CREATE SEQUENCE emp_seq
start with 1
increament by 1
insert into emp (empno, ename, sal, deptno)
values (seq_emp.nextval, 'Oracle Guru', 2300, 10)
OR create a trigger to do this.
now the question is do I have to create several emp_seq's?? because I have several tables that needs the auto increment. I understand how the sequence and trigger is used as a work around here. but are there any other options available? I am running Oracle 9i (9.2)