Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ???? creating key by itself ??????
ido wrote:
>
> I am using Delphi to work on my Tables wich are controlled by Oracle DBMS.
> The tables where created using Designer/2000.
> Ok my problem is, is it possible to let Oracle generate unique keys when
> inserting a record, so I don't have to do this in Delphi??
>
If you are using Delphi, then you have probalbly played around with the Paradox DB included with it. If you have, or are already familiar with Paradox, then you know about the self incrementing datatype available there.
*SIGH* If only such an animal were available in Oracle...
The closest we can get is to create a sequence for the column and an insert trigger which reads the next value from the sequence and places it to be inserted into the proper column.
Read about sequences in the Server Applications Developer's Guide.
-- Tomm Carr -- "Can you describe your assailant?" "No problem, Officer. That's exactly what I was doing when he hit me!"Received on Thu Jul 17 1997 - 00:00:00 CDT