Another way would be to use the UPDATING function like this: create or replace trigger my_trigger before update on my_table for each row declare n_cols integer := 0; begin for r in (select column_name from all_tab_columns where table_name = 'MY_TABLE' and owner = 'MY_SCHEMA') loop if updating(r.column_name) then n_cols := n_cols 1; exit when n_cols It's probably not the answer you want to hear, but I think you are rather over-exaggerating the burden of maintenance.
CREATE TABLE game_player_audit 2 (player_id NUMBER, 3 game_id NUMBER, 4 group_number NUMBER, 5 old_marked VARCHAR2(1), 6 new_marked VARCHAR2(1), 7 old_pcmac VARCHAR2(1), 8 new_pcmac VARCHAR2(1), 9 old_score NUMBER, 10 new_score NUMBER, 11 change_date DATE, 12 operation VARCHAR2(6)); Table created.
My update statement is wrong here as it is trying to update one column with multiple values at a time. I do not have much experience in Oacle, please help me on this.
Thanks Mona No SQL is there to make update on a set.
What is the SQL update syntax to update more than one column?
Answer: The landmark book "Advanced Oracle SQL Tuning The Definitive Reference" is filled with valuable information on Oracle SQL Tuning.