The basic rules:

– a nested transaction is basically ignored

– when a commit statement is issued, the transaction is not physically commited until the outermost transaction is commited.

– a rollback operation rollbacks all current transactions (so only one rollback statement is needed).

– one can control which transaction to be rolled back by using ROLLBACK TRANSACTION ‘name’; the transaction name must be the current transaction name or an outer transaction name; it cannot be the name of a nested transaction.