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 -> Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 23 Apr 2007 08:15:57 -0700
Message-ID: <1177341356.870467@bubbleator.drizzle.com>


Galen Boyer wrote:

>> If a developer can't handle
>>
>> INSERT INTO t
>> (idcol)
>> VALUES
>> (idseq.NEXTVAL);
>>
>> Then they should learn to say 'do you want fries with that'.
>>
>> I hate to be a bit harsh here but it isn't exactly like asking
>> them to step up to a real hardship like curly braces or assembler.

>
> Daniel,
>
> You are just being completely disingenuous. As the codebase grows and
> grows, it would be quite easy for even a very experienced developer to
> call the wrong sequence and it could take awhile before it might get
> uncovered. The less you have to manually tie things with code, the
> better. Thats just plain common-sense.

Not disingenuous ... humorous (I hoped).

Of course it possible to make mistakes. It is possible to update the wrong column. It is possible to assign a value to the wrong variable. It is possible to log onto prod and truncate a table thinking it was test (ask me how I know <g>).

That is a good reason to have code reviews. That is a good reason to have a test cycle. That is not a good reason for autoincrementing columns.

If code reviews and testing don't catch it you have far bigger problems to deal with.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Mon Apr 23 2007 - 10:15:57 CDT

Original text of this message

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