Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Oracle Primary key and Delphi: How to insert the primary key value automatically ?
At the moment I am developing a client/server application with delphi 3
Client/Server and Oracle 7.3.3.
To make the application as fast as possible I want to use numeric primary
keys.
Oracle has the possibilty to generate sequence numbers that can be used as the value for the primary key in a table. For instance:
Create sequence order_seq
start with 1 increment by 1 nocylce cache 20;
At the moment I insert a new record in a table I can reference the sequence
number with NEXTVAL.
For instance:
Insert into orders (orderno, custno)
values (order_seq.NEXTVAL, 1032)
Questions:
Thank you very much in advance !!
sincerely,
Ger Otten
email: gmjotten_at_worldonline.nl Received on Sun Sep 21 1997 - 00:00:00 CDT
![]() |
![]() |