Enable/Disable Trigger in Sybase
What's wrong with that query?
alter table TableName enable trigger 'TriggerName'
Error is
Line 1, column 30
Co开发者_如何学JAVAuld not execute statement.
ASA Error -131: Syntax error nera 'enable' on line 1
The error message is from Sybase SQL Anywhere (ASA), but the syntax you're trying to use is not valid in ASA, it would be in Adaptive Server (ASE) though. I don't think there is an equivalent in ASA.
I have updated the answer on the ASA forum that Martin pointed out http://sqlanywhere-forum.sap.com/questions/389/how-to-temporary-disable-a-trigger-inside-a-procedure-and-enable-again?page=1#13221 read it for details.
In summary you can use SET OPTION FIRE_TRIGGERS = OFF;
or SET TEMPORARY OPTION FIRE_TRIGGERS = OFF;
精彩评论