Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A unique counter
ROWID will not work. You need to create a sequence, and use it to populate
your id field.
CREATE SEQUENCE cust_id_seq INCREMENT BY 1 START WITH 1 ;
You then use it like this:
INSERT INTO customer (Name, Contact, ID) VALUES ('ACME PIANO COMPANY', 'WYLE E COYOTE', cust_id_seq.NEXTVAL); Received on Fri Oct 15 1999 - 14:40:39 CDT
![]() |
![]() |