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: how to define a pseudo auto value column in oracle?

Re: how to define a pseudo auto value column in oracle?

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Thu, 10 Feb 2005 15:23:54 +0100
Message-ID: <cufqme$iqj$1@news1.zwoll1.ov.home.nl>


Robert Wehofer wrote:
>>Hated by who exactly? Joe Celko has made it more than clear in numerous
>>communications that those "beloved" identity columns don't even belong
>>in a relational database. And exactly what is it about typing:
>>CREATE SEQUENCE x;
>>that is so hard on your fingers?
>>
>>Or is it using the sequence in your insert statement that causes you so
>>much pain?
>>
>>INSERT INTO t VALUES (x.NEXTVAL);

> 
> 
> You don't understand the problem. The problem is, that sequences don't allow
> database independent programming (by means of ADO). Most of database types
> do have the datatype Autovalue. Oracle don't support this datatype.
> 
> Robert
> 
> 

Besides what Norman already explained, you don't seem to understand Oracle. You set it up once, and then you manipulate data, perhaps using ADO.
There's a bad habit of dropping and creating tables 'on the fly' in Oracle (and probably SS2K as well - it reminds me of Foxbase). The insert into ...(select * from ...) is the same... MS will have its autonumbering, Oracle it's sequences. No bother to you...

There's one rather nice feature about sequences and triggers. You can use the same value generated in different tables (neat for cascading primary key values...). Don't see how MS would do that.

-- 
Regards,
Frank van Bortel
Received on Thu Feb 10 2005 - 08:23:54 CST

Original text of this message

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