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: ORACLE and a Counter field or Identity????

Re: ORACLE and a Counter field or Identity????

From: MarkP28665 <markp28665_at_aol.com>
Date: 1997/11/11
Message-ID: <19971111225201.RAA03758@ladder02.news.aol.com>#1/1

From: Andy Harkin <aharkin_at_storm.ie>
>>I don't know how to setup a table with a counter or a Identity field, so I
 gave up on that side. Then i thought leave it as a number then create a  trigger. <<

Try looking up sequence generators in manual as this would be a better approach  than using a trigger. Then you can do the insert like:

insert into table_name (col1, col2, etc...) values (sequence_name.nextval,:var2,etc...)

Mark Powell -- The only advise that counts is the advise that you follow so follow your own advise Received on Tue Nov 11 1997 - 00:00:00 CST

Original text of this message

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