Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Does oracle have an auto increment column
In article <6l85tj$847$1_at_news01.iafrica.com>,
"Dennis JR Harding" <dennish_at_wpr.co.za> wrote:
>
> Sorry to be a boar, being unfamiliar to Oracle I have the following
> question:
> Does Oracle have a data type of auto increment when creating a table
> (similar to Informix Serial data type of the Paradox AutoNumber).
>
> please respond by email to snseabrook @ wpr . co . za
>
> Thank you
>
>
Oracle does not have serial data types and you should use Oracle sequnces
and table row triggers to auto increment fields with type NUMBER.
Using serial numbers, I means incremented with some fixed numbers, for
example by 1, cause table locking and should be avoided. Oracle sequences
does not guaranteed you "serial" number, as some numbers may be skipped,
for example when user issue rollback, but provide you unique numbers
and user concurrentness.
Yours
Alexandre
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri Jun 05 1998 - 08:11:16 CDT