我正在测试这个 perl 脚本,它基本上调用过程并在 2 个表上运行 DELETE。
问题:
- perl 中的过程或调用过程有什么问题吗?
我可以在单个过程中使用 2 个删除吗?
Procedure delete (v_db_id in number) IS BEGIN DELETE from TAB1 where db_id = v_db_id; DELETE from TAB2 where db_id = v_db_id; END delete;
PERL 脚本:
sub getdelete {
my $dbID = shift
my $rs;
my $SQL;
$SQL = q{delete (?)};
$rs = executeQuery($SQL,$dbID);
$rs -> fetchrow();
$rs -> finish();
}
PERL 脚本调用子程序 getdelete 如下:
&getdelete ($dbID);
错误:
DBD::Oracle::st execute failed: ORA-00900: invalid SQL statement (DBD Error: OCIStmtExecute)[for statement "delete"]