Hello, i have created two tables account1 and log_table and tried to create trigger as follows::

create or replace trigger acc_history
after update of balance
ON account1
for each row
begin
insert into log_table
values(:old.c_name,:old.balance,:old.acc_no,:new.balance,timestamp);
end;

but its giving errors such as::

SQL> show errors;
Errors for TRIGGER ACC_HISTORY:

LINE/COL ERROR
-------- -----------------------------------------------------------------
2/1 PL/SQL: SQL Statement ignored
2/13 PL/SQL: ORA-00913: too many values

I am unable to fix these errors...need help...Thanks

attributes of account1 table is (acc_no,c_name,balance) and of log_table is(acc_no,c_name,old balance,new balance,timestamp)

kindly recheck the code,

check the values that you are passing to the log table.

do post your table structure and code again.

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.