Dear Friend,
Syntax for old and new keywords in Triggers were :Old.<Column_name> referes the existing value of the column in a record. :New.<Column_Name> referes the new value for the column in a record.
In your Triggers what is New_id? is a column in Temp table.
If New_id is a column in Temp table then use :New.New_id or only ID is a column in the Temp table then use :New.Id.
And u can directly assign the value to the variable c_id like c_id=:new.id(I am considering ID is the column name)
go though this
-
-
SQL> create table temp (id varchar2(15));
-
-
Table created.
-
-
SQL> ed
-
Wrote file afiedt.buf
-
-
line 9 truncated.
-
1 CREATE OR REPLACE TRIGGER TEMP_TR BEFORE
-
2 INSERT ON TEMP FOR EACH ROW
-
3 DECLARE
-
4 c_id varchar2(15);
-
5 BEGIN
-
6 c_id :=:new.id;
-
7 dbms_output.put_line('Output from the Trigger c_id : '||c_id);
-
8* END;
-
9 /
-
-
Trigger created.
-
-
SQL> set serveroutput on;
-
SQL> insert into temp values('Gnk');
-
Output from the Trigger c_id : Gnk
-
-
1 row created.
-
-
SQL>
-
-
Regards
GNK