Using sequential id numbers in Oracle
Posted on 2004-08-16
I am new to using oracle, and i have created a table with these commands:
CREATE TABLE contacts_cat (
id number(9) NOT NULL,
tablespace user_data storage(initial 500k next 500k pctincrease 0) / alter table contacts_cat add constraint pk_contacts_cat PRIMARY KEY (id) using index tablespace indx;
create sequence seq_contacts_cat increment by 1 start with 1 minvalue 1 maxvalue 100000000 cycle cache 30;
But I am not really sure what all of the commands mean.
Now I need to insert into the Db.
How do I make use of the sequential numbering for the id field (i.e., I just want each new line to follow a sequential numbering pattern and increment by one every time so that there are no duplicates).