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

Home -> Community -> Mailing Lists -> Oracle-L -> More than one table for a Triggers

More than one table for a Triggers

From: Kean Jacinta <jacintakean_at_yahoo.com>
Date: Wed, 1 Jun 2005 03:37:23 -0700 (PDT)
Message-ID: <20050601103723.57415.qmail@web52904.mail.yahoo.com>


Hi :)

I know that one trigger can be assign to only one table.
I have a situation here, Below are all the tables

mapped_table



mappedid --pk
comid
empid
passportno

company_table



comid
comname
employee_table

empid
empname
passportno

The mapped_table takes the value from two other table which is company and employee tables.

A trigger name :autoinsert_mapped_tr
This trigger will automatically takes value comid,empid,passportno from both company and employee table into mapped_table on insert and mappedid is a seq number.

Since trigger is tied to one table, how can the above scenario be done? I didn't want to create 2 triggers , one for company on insert and another triggers for employee on insert.

Thank You
Jkean                     



Discover Yahoo!
Use Yahoo! to plan a weekend, have fun online and more. Check it out! http://discover.yahoo.com/
--

http://www.freelists.org/webpage/oracle-l Received on Wed Jun 01 2005 - 06:42:18 CDT

Original text of this message

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