我有存储过程,执行2个操作,删除然后更新。我的目的是更新应该经常更新一行,若再行更新,我想取消这两种操作,这是我的交易,我试图把交易存入存储过程以取消所有操作
BEGIN
BEGIN transaction trans;
(here is delete query)
(here is update query)
IF SQL%ROWCOUNT > 1 THEN
ROLLBACK TO tran;
ELSE
COMMIT;
END IF;
END;
END;
但是这会产生错误Error(5,23): PLS-00103: Encountered the symbol "TRANS" when expecting one of the following: := . (@ % ; The symbol ":=" was substituted for "TRANS" to continue.
什么是不正确
是的,我想中止这两个查询,这是太简单了,谢谢! –