我有存儲過程,執行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.
什麼是不正確
是的,我想中止這兩個查詢,這是太簡單了,謝謝! –