Описание тега savepoints
A savepoint is a way of implementing subtransaction (also known as nested transaction) concept.
A savepoint is a point withing a transaction (withing a relational database management system) to which the transaction can be "rolled back" without affecting any work done before the savepoint was created.
A savepoint is a way to create a single subtransaction, or multiple subtransaction nested in one another, and it does not enable creating 2 paralell 'subtransaction', one of which would be rolled back and the second commited.
Savepoints on specific RDBMS
ORACLE and PostgreSQL SQL dialects have the same syntax for creating and rolling back to savepoint
SAVEPOINT savepointName;
creates a named savepoint
ROLLBACK TO savepointName;
invalidates all SQL queries done before creating savepoint and now.
When using ORACLE, note that any DDL operation issues implicit commit.