Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

New Column (autonumber option)

631584Aug 20 2008 — edited Aug 20 2008
I'm looking to implement a unique identifier for all entries is a table. I would assume this would need to be done using a trigger, but I'm curious on the 'workings'.

How would be the best way to complete this? Would it be a simple statement that similar to this or is there an alternative to have this field populated automatically..>?

INSERT INTO departments (id, description)
VALUES (dept_seq.NEXTVAL, 'Accounting');
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2008
Added on Aug 20 2008
8 comments
542 views