This is the SQL Server's document talking about the ROLLBACK
statement. On that page it states that the syntax of it is as follows:
ROLLBACK { TRAN | TRANSACTION }
[ transaction_name | @tran_name_variable
| savepoint_name | @savepoint_variable ]
[ ; ]
Apparently the stuff inside square brackets are optional and it seems you should choose one from TRAN
or TRASACTION
. But in fact you can completely omit both and ROLLBACK
is a perfectly valid statement. Is this an error or intentionally?