Re: Row's Counter of Oracle tables
Date: Wed, 17 Nov 1999 08:45:50 -0500
Message-ID: <YrEyOItK42GfU=xN955wlthP7W6U_at_4ax.com>
A copy of this was sent to Phantom <romaNOroSPAM_at_optima.dp.ua.invalid> (if that email address didn't require changing) On Wed, 17 Nov 1999 04:03:40 -0800, you wrote:
>Hello, all:)
>
>Help please! Give me the hint how to implement the counter
>(PrimarKey) of table in Oracle DataBase ?
>Insertion of rows in this table have to be done by Microsoft
> Access client via OpenTable command.
>
create sequence your_sequence;
create or replace trigger your_trigger
before insert on T for each row
begin
select your_sequence.nextval into :new.primary_key_column from dual;
end;
/
>
>* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
-- See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA Opinions are mine and do not necessarily reflect those of Oracle CorporationReceived on Wed Nov 17 1999 - 14:45:50 CET