top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Write Sql syntax to create Oracle Trigger before insert of each row in employee table

0 votes
361 views
Write Sql syntax to create Oracle Trigger before insert of each row in employee table
posted Dec 14, 2015 by Sathaybama

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer
CREATE OR REPLACE TRIGGER EMPLOYEE_ROW_ID_TRIGGER
BEFORE INSERT ON EMPLOYEE FOR EACH ROW
DECLARE
seq_no number(12);
BEGIN
select EMPLOYEE_ID_SEQ.nextval into seq_no from dual ;
:new EMPLOYEE_ID :=seq_no;
END;
SHOW ERRORS;
answer Dec 14, 2015 by Shivaranjini
...