Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORACLE and a Counter field or Identity????
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