ekant_alone (9/13/2013)
My assumption was that SP has sequential processing and not parallel processing. Is it possible that it can run statement 2 along with step 1.
Your assumption is correct, statements in a stored procedure execute in sequence. Step 2 won't start until step 1 completes. Step 1 will lock rows in TableB though. Should just be shared locks, but they will be locked.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability