我正在将Oracle SQL Developer v4.1.2.20与IBM DB2 v10.5数据库结合使用。
为什么我可以选择和运行这样的多个语句:
drop trigger T_MyTab1;
drop trigger T_MyTab2;
但如果我选择这两个陈述就失败了:
create trigger T_MyTab1 after insert on MyTab1 referencing new as n for each row mode db2sql insert into MyAuditTab1 values (n.col1);
create trigger T_MyTab2 after insert on MyTab2 referencing new as n for each row mode db2sql insert into MyAuditTab2 values (n.col1);
错误是:
DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=create trigger T_MyTab1 after inse;BEGIN-OF-STATEMENT;<space>, DRIVER=3.69.24
同样的SQL在SquirrelSQL中工作正常,所以我认为它与SQL Developer中的行分隔符有关...