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

how to define a pseudo auto value column in oracle?

From: Robert Wehofer <thalion77_at_graffiti.net>
Date: Tue, 08 Feb 2005 13:49:52 GMT
Message-ID: <4s3Od.35504$2e4.21171@news.chello.at>


Hello there!

One of the most hated features in Oracle are the intricated use of sequences to create valid IDs for a prim key column. In Access you've got the data type Autovalue, which is solid and simple. In Oracle you need to know the name of the sequence and have to call nextval, if you want to insert a dataset. Is there a way to automate the setting of the ID using sequences? One way is to use insert triggers, but is there a possibility to define a sequence as default value for a prim key value? If yes, how would be the syntax of the 'create table' statement? And is ADO able to return the data type Autovalue, if a column in Oracle has got a sequence as default value?

Regards,
Robert Received on Tue Feb 08 2005 - 07:49:52 CST

Original text of this message

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