Description:
Set the savepoint to which you can later rollback.
Syntax:
db.savepoint(spn)
Note:
The function creates a save point named spn. The save point name must not be omitted and repeated
Parameter:
db |
Database connection |
spn |
Savepoint name |
Return value:
Boolean
Example:
|
A |
|
1 |
=connect("demo") |
|
2 |
=A1.savepoint("num1") |
Set a savepoint named "num1". |
3 |
=A1.execute@k("delete from DEPARTMENT where DEPT='TecSupport'") |
Execute the sql statement and later do not commit the transaction. |
4 |
=A1.rollback("num1") |
Roll back to "num1". |