Re: fetch updated columns in 'before update' trigger
> 'delete and recreate updated trigger'
Can't be done while the Trigger is being invoked.
> I don't want to have to modify my trigger every time I add a column
SQL isn't a complete computer language, Triggers and much else need specific table & column specs. And, in a correctly designed database, DDL changes should be rare except when the requirement changes enough to require a major upgrade, so if you expect to be adding columns often, what problem drives that expectation?
> list of updated columns
You'd need to code that yourself, eg by storing a copy of the Update statement in a table and having the Trigger retrieve and parse it. But it might not be helpful---MySQL doesn't support dynamic SQL in Triggers.
Subject
Views
Written By
Posted
1286
September 05, 2019 08:27PM
700
September 05, 2019 08:53PM
690
September 05, 2019 09:03PM
Re: fetch updated columns in 'before update' trigger
662
September 05, 2019 09:57PM
1402
September 05, 2019 10:15PM
809
September 06, 2019 09:42AM
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.