Is there a difference in adding explicit committo mine transactionthan automatic commit.
explicit commit
transaction
CREATE TABLE #test (test_col INT)
With explicit COMMIT
INSERT #test VALUES (11) BEGIN TRY BEGIN TRAN DELETE_TRAN DELETE FROM #test COMMIT TRAN DELETE_TRAN END TRY BEGIN CATCH ROLLBACK TRAN DELETE_TRAN SELECT ERRORMESSAGE = Error_message() END CATCH SELECT * FROM #test
Without explicit commit
INSERT #test VALUES (11) BEGIN TRY BEGIN TRAN DELETE_TRAN DELETE FROM #test END TRY BEGIN CATCH ROLLBACK TRAN DELETE_TRAN SELECT ERRORMESSAGE = Error_message() END CATCH SELECT * FROM #test
Here both do the same. Can anyone tell if there is any difference or advantage over each other.
, , , , COMMIT , , ( temp ) SELECT . SELECT , (, WITH (NOLOCK) ..) , COMMIT.
- , , , , , - TRAN . , . .
, TRAN, SQL, , COMMIT TRAN. , SQL , TRAN COMMIT, TRAN ROLLBACK.
, , , , : SQL Server -
Source: https://habr.com/ru/post/1630047/More articles:Hibernation configuration for balancing MongoDB - javaUnable to override height with! Important with javascript - javascriptHow to run JMH Benchmark in Maven Using exec: java instead of exec: exec? - javaCss pseudo-classes change the value of the choice when the mouse leaves in Firefox - htmlChanging default environment in anaconda - pythonRabbitMQ com.rabbitmq.client.AlreadyClosedException: соединение уже закрыто из-за ошибки подключения - javaJRProperties has become an obsolete, recommended replacement method - javaTinyMCE Insert / Edit Image Source Buttons - htmlLaravel 5.2: No hint defined for [flash] - laravelIsequal to? - htmlAll Articles