CMDAI
asked on
Mysql Update without triggering the trigger
Is it anyway possible to write an update query which would not activate the trigger on that table which is being updated?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
- yes sorry about that. you need to disable it one by one and enabled it back. and thats the only way for 'not activating' the trigger while doing other processing.
ASKER
MYSQL does not have this option but a workaround would be to put veriables to disable trigger in each trigger
ALTER TABLE tablename DISABLE TRIGGER ALL
- run your update operation.
- then enabled trigger back:
ALTER TABLE tablename ENABLE TRIGGER ALL