SAVEPOINT

Sets a savepoint.

SYNTAX

savepoint_name Name you want to assign to the savepoint.

DESCRIPTION

The SAVEPOINT command sets a savepoint in the current transaction and assigns a name to that savepoint. Any user with CONNECT or higher security privileges can execute the SAVEPOINT command.

The SAVEPOINT command can be used in conjunction with the ROLLBACK command to roll back only a portion of the commands in a transaction. To do this, you specify a savepoint name in the ROLLBACK command and DBMaker rolls back all commands that were executed after the savepoint. The transaction remains active and locks acquired by the transaction are not released.

When you specify a savepoint name that does not exist, DBMaker will roll back the entire transaction and return an error. The transaction is aborted and all locks acquired by the transaction are released. If you try to assign the same savepoint name twice in the same transaction, the first savepoint is canceled and the name is assigned to the second savepoint.

EXAMPLE

The following example sets a savepoint named SavePoint1 in the active transaction.

SAVEPOINT SavePoint1

RELATED COMMANDS

< ROLLBACK | Contents | SELECT >

Copyright 2002 SYSCOM Computer Engineering Co. All rights reserved.