Re: Question about Sequence Numbers

From: Kevin P. Fleming <kfleming_at_access-laserpress.com>
Date: Wed, 24 Mar 1999 19:56:42 GMT
Message-ID: <_rbK2.12402$7L.2895_at_news.rdc1.az.home.com>


You need to create a BEFORE INSERT trigger on that table to select the sequence's NEXTVAL and populate your primary key field. It's pretty simple, and there are good examples in the Oracle documentation.

ogillert wrote in message <36F92AAF.FAFCAD13_at_delanotech.com>...
>How do I get a table to automatically use a sequence number? I have a
>table with a field that will always be populated be a sequence number.
>But instead of doing it in the Insert statement I want it to
>automatically generate this number. In other words how do I get Oracle
>to do what MS Access does using an 'Autonumber' field and SQLServer does
>using an 'Identity' field. Any help would be greatly appreciated.
>
>Thanks in advance,
>Oliver Gillert
>
Received on Wed Mar 24 1999 - 20:56:42 CET

Original text of this message