hey,
i want to create trigger on delete operation of table say t1...and i want to delete entries from another table say t2 which are related to removed entry in t1....so i tried to create another trigger on delete operation of t2 to store entries from t2..
here is the code,i am having error while creating 2nd trigger...

SQL> create table empl
2 (
3 eno number,
4 ename varchar(10),
5 prono number
6 );

Table created.

SQL> create table proj
2 (
3 prono number,
4 proname varchar(20)
5 );

Table created.


SQL> ed
Wrote file afiedt.buf

1 create table log1
2 (
3 eno number,
4 ename varchar(10),
5 prono number,
6 pronm varchar(10)
7* )
8 ;

Table created.


SQL>Create or replace trigger del
2 before delete
3 on proj
4 for each row
5 Begin
6 delete from empl
7 where empl.prono=prono;
8* End;
SQL> /

Trigger created.

SQL> Create or replace trigger del_4m_empl
2 before delete
3 on empl
4 for each row
5 Begin
6 insert into log1 values(eno,ename,prono);
7 End;
8 /

Warning: Trigger created with compilation errors.

SQL> show errors;
Errors for TRIGGER DEL_4M_EMPL:

LINE/COL ERROR
-------- -----------------------------------------------------------
2/6 PL/SQL: SQL Statement ignored
2/40 PL/SQL: ORA-00984: column not allowed here


Thank you...please help me out..

From where you are getting these ----eno,ename,prono, inside the trigger.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.