Advantage SQL Engine
Creates a savepoint inside the existing transaction.
Syntax
SAVEPOINT savepointname
Remarks
SAVEPOINT creates a point in the transaction to which all work can be rolled back to without ending the transaction. The transaction state is shared with the client, so a savepoint cannot be created in SQL if a transaction has not been started either by an Advantage client (i.e., ACE API AdsBeginTransaction) or through the Advantage SQL engine.
Note SQL transactions behave exactly like client transactions. Therefore, with Advantage Local Server, transactions are not supported but are expected to be executed in a correct sequence.
Examples
BEGIN TRANSACTION;
UPDATE sal SET salary = 35000.00 WHERE emp_id = 25089;
SAVEPOINT test;
DELETE FROM sal WHERE salary > 36000.00;
ROLLBACK TO SAVEPOINT test;
COMMIT WORK;