Please help me........
Prakash.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shankar MPosted Apr 27, 2013, 12:39 AM
Assume that You are Inserting a record from Table EMP to Table EMP1.
The After Insert Trigger Should be coded as,
Here :NEW.EMPNO is the EMPNO value that is inserted in the EMP Table.
Blocked AccountPosted Mar 8, 2013, 4:27 AM
Id , Name, Phone etc.
We can define insert trigger like that
CREATE OR REPLACE TRIGGER employerInsert
AFTER INSERT
| ON Employer
FOR EACH ROW
DECLARE
empName varchar2(10);
BEGIN
-- Find username of person performing the INSERT into the table
SELECT user INTO empName
FROM dual;
-- Insert record into audit table
INSERT INTO empHistory
( empId,
Phone,
username )
VALUES
( :new.id,
:new.phone,
empName );
END;