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: <hasta_l3_at_hotmail.com>
Date: 21 Apr 2007 22:10:26 -0700
Message-ID: <1177218626.173604.277610@e65g2000hsc.googlegroups.com>


> Not at all. Surrogate keys have their place in the real world.
>
> What I don'tlike is forced serialization of autoincrementing.

Agreed

> What I don't like is tying the surrogate to a single object.

Agreed, if you mean "always tying"

> The Oracle sequence is a far more intelligent way to solve the problem.

Daniel... I think that nobody wants to drop sequences. They are a great tool.

However, sequences are pretty often used to provide a unique primary key for a single table.

Repeatedly implementing this scenario with sequences is verbose and/or error-prone.

What people would like is to *supplement* sequences with a declarative way to tell oracle : Please provide a unique value for this primary key if none specified.

Something like DB2, which - as I get it - has both SEQUENCEs and IDENTITY columns... Received on Sun Apr 22 2007 - 00:10:26 CDT

Original text of this message

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