Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home
Jazz home  >  Papers & Training

IMAGE/SQL: Issues and answers concerning SQL tables

» 

Jazz home

»

Software

»

Papers & Training

»

Java

»

HP Partners

»

News & Events

»

Register for more info

Content starts here
Prev Page Next Page Manual Top Home Page


5.10 Savepoints



Key points


  • A SAVEPOINT is a transaction marker that allows you to roll back part of a transaction. ROLLBACK TO SAVEPOINT will not end the transaction or release locks that were obtained prior to the setting of the SAVEPOINT, but it will release locks that were obtained after the SAVEPOINT was issued.

  • A SAVEPOINT can be placed anywhere between the BEGIN WORK and COMMIT WORK statements.

  • Multiple SAVEPOINT statements can be issued within a transaction. ALLBASE/SQL assigns a number to each one. The number is returned programmatically if a host variable is provided when the SAVEPOINT statement is issued.

  • The first SAVEPOINT number returned in a transaction is 1. The largest possible SAVEPOINT number is (2**31)-1.

  • In order to ROLLBACK TO SAVEPOINT, the number of the appropriate SAVEPOINT must be specified in the ROLLBACK WORK statement. Please refer to the example for ROLLBACK WORK above.

  • The slide shows that the SAVEPOINT is useful when the user decides not to withdraw the $20.00, but still wishes the $100.00 transferred.


Prev Page Next Page Manual Top Home Page

Page last updated on November 29, 1995

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.