Reputation: 8151
I have come across the following T-SQL:
...
COMMIT TRANSACTION
END TRANSACTION
BEGIN TRANSACTION;
...
What is the difference between COMMIT and END transaction in this case?
Upvotes: 1
Views: 116
Reputation: 39045
END TRANSACTION
doesn't exists in SQL Server T-SQL.
The only transaction commands available are BEGIN TRANSACTION
, with an optional name, plus COMMIT
and ROLLBACK
, also with optional name.
END TRANSACTION
will give you a syntax error.
Upvotes: 3