Action initiation after inserting a record in a table?

I am having a table EMPLOYEE. In that, we have list of all employees in that table.

We have Emp No, Name, Gender, Salary, Joining date , Valid_Employee columns.

When there is a female employee entry in a table, I want to do set of actions. Such as insertion of another entry in another table.

Is there any way we can acheive this in oracle?

I am using oracle 10g.

more ▼

asked Dec 14, 2009 at 03:21 PM in Default

avatar image

131 9 10 14

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

You want to create a trigger on the table.

Introduction to Triggers

You can either have the trigger only fire if the employee is a female using the WHEN clause, or use an IF...THEN in the trigger body.

more ▼

answered Dec 14, 2009 at 04:12 PM

avatar image

Dean Langford
111 2 2

Thanks a lot Dean Langford. Triggers solved my problem.

Dec 14, 2009 at 04:54 PM dbkid
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Dec 14, 2009 at 03:21 PM

Seen: 802 times

Last Updated: Dec 14, 2009 at 03:21 PM

Copyright 2016 Redgate Software. Privacy Policy