Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: TRIGGERS

Re: TRIGGERS

From: Kean Jacinta <jacintakean_at_yahoo.com>
Date: Wed, 18 May 2005 07:16:06 -0700 (PDT)
Message-ID: <20050518141606.43975.qmail@web52906.mail.yahoo.com>


Hi ;

This is what i have achieved so far

  1. insert into myclass (name,type) values (good, 8); The Trigger will auto insert increment id into myclass table.

id name type
-- ------ ----
1 good 8'

I manage to make it work thank to everyone here in this forum.

2) Now on the same table myclass, i want to be able to insert the id manually as well.

insert into myclass(id,name,type) values (4,bad,8);

My objectives by the end of the day , is the myclass table is able to support auto generate seq no and it's also able to accept manual id inserted as well. Can it be done ? And how to do it ? So that once the trigger detected is manual id inserted it will then insert d id without running d myclass_seq. If the manual id provided has is alrdy existed in database then prompt error message to user. If the autonumber sequnce detected the id existed in the database then it will quitely skip d number and take nextval until a  unique value is found.

Oh you can understand what i am trying to explain here.

THANK YOU JK


Do you Yahoo!?
Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail
--
http://www.freelists.org/webpage/oracle-l
Received on Wed May 18 2005 - 10:20:48 CDT

Original text of this message

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