I am new to SQL translation. What is the meaning of the following statement?
BEGIN TRAN -- xlock the transaction IF EXISTS (SELECT 1 FROM dbo.ActiveTransaction WITH (XLOCK) WHERE TransactionId = @transactionId) BEGIN (Omitted) END COMMIT TRAN
Thank!
What's going on here:
dbo.ActiveTransaction
TransactionId
"XLOCK" means that :
Indicates that exclusive locks should be taken and held until the transaction is completed. If set using ROWLOCK, PAGLOCK or TABLOCK, exclusive locks apply to the appropriate level of detail.
Source: https://habr.com/ru/post/1792997/More articles:C: Any way to convert a text string to float, i.e. 1e100? - cWhat is a good algorithm to protect the kingdom? - c ++Как открыть файл программно с помощью EnvDTE в С# - c#how to avoid wrapping in div? - javascriptHow to display strings in WPF ListView in different colors? - listviewJavascript Iteration Error - Variable Variable - javascriptfrom new classobj import in Python 3.1 - pythonWhere did the language “I” come from? - programming-languages | fooobar.comYii, ajax, Button. How to prevent multiple JS bindings onclick - ajaxCustom MKAnnotationView - iphoneAll Articles