3
我試圖在Oracle 11g中創建一個保存點。保存點從未創建錯誤
ALTER TABLE ORDERS
DISABLE CONSTRAINT ORDERS_C_ID_FK;
DELETE FROM CUSTOMER;
SELECT * FROM CUSTOMER;
ROLLBACK;
SELECT * FROM CUSTOMER;
SAVEPOINT SAVEPOINT1;
ALTER TABLE ORDERS
DISABLE CONSTRAINT ORDERS_OS_ID_FK;
ALTER TABLE ORDER_LINE
DISABLE CONSTRAINT ORDER_LINE_O_ID_FK;
TRUNCATE TABLE CUSTOMER;
TRUNCATE TABLE ORDER_SOURCE;
TRUNCATE TABLE ORDERS;
DELETE FROM ORDERS;
ROLLBACK TO SAVEPOINT1;
,但我一直從SQL開發人員收到此錯誤
ROLLBACK TO SAVEPOINT1 Error report: SQL Error: ORA-01086: savepoint 'SAVEPOINT1' never established in this session or is invalid 01086. 00000 - "savepoint '%s' never established" *Cause: Trying to roll back to a save point that was never established. *Action: