Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> how to define a pseudo auto value column in oracle?
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