Hello SQL Experts,
I have some code that updates/inserts some data in a SQL database/table. After reviewing the code in action, I realized that I am opening and closing the SQL connection with each update/insert. I want to make it more efficient as there could be 1000's of "transactions" happening very quickly. My question is: Will SQL process updates/inserts in the order it receives them if all submitted at once?
For example: If I submit the below statements at the same time, will SQL process them in the order they are in? or will it randomly process them (possibly out of order)? Is there a way to force SQL to process them in order?
UPDATE databaseA.dbo.TableA SET MyColumn='ColumnValue';
UPDATE databaseA.dbo.TableA SET MyOtherColumn='MyOtherColumnValue';
Thank you in advance!!