Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to increment ID with every insert

How to increment ID with every insert

From: Steve <ngsteve_at_my-deja.com>
Date: 8 Oct 2001 03:43:52 -0700
Message-ID: <976e0586.0110080243.254ca094@posting.google.com>


I would like to be able to have a primary key that starts at 1 and increases by 1 everytime a new record is inserted.(ID must be unique) Example first record would have ID=1 then next insert will have 2 and so on.....
A table NEWTABLE with three columns ID,NAME,DESC INSERT INTO NEWTABLE (NAME,DESC) VALUES ("sally","girl") In Microsoft SQL Server, I would go to design table and specify say ID as primary key and identity seed 1 and identity increment 1
How to do this in Oracle?How to do this in Oracle DBA studio? Any help would be much appreciated. Received on Mon Oct 08 2001 - 05:43:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US