MySQL Forums
Forum List  »  Triggers

Is it possible to reference NEW and OLD without explicit column names?
Posted by: Dag Sondre Hansen
Date: June 15, 2012 04:45AM

I am trying to write a generic (table independent) trigger for logging data changes on the column level - with very limited success. (Community server v5.5.34).

My research so far tells there is no way to access the NEW and OLD aliases without explicitly stating column names, since prepared statements are not allowed in triggers and referencing NEW/OLD as NEW.* or OLD.* results in an unknown table error.

Does anyone else know of any way to do this, or am I banging my head against an all too familiar wall?



Edited 1 time(s). Last edit at 06/15/2012 05:58AM by Dag Sondre Hansen.

Options: ReplyQuote


Subject
Views
Written By
Posted
Is it possible to reference NEW and OLD without explicit column names?
2719
June 15, 2012 04:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.