I ask this question because from time to time I get a dead end that I do not understand.
This is the scenario:
Stored procedure that updates table A:
UPDATE A SET A.Column = @SomeValue WHERE A.ID = @ID
Stored procedure that is inserted into the temporary #temp table:
INSERT INTO
I see that there might be a wait for a lock, but I donβt see how a dead end will happen, will I miss something obvious?
EDIT:
The SP that I typed here are obviously simplified versions, but I use the columns used. The structure of both tables will be:
CREATE TABLE A (ID IDENTITY CONSTRAINT PRIMARY KEY, Column VARCHAR (100)) CREATE TABLE B (ID IDENTITY CONSTRAINT PRIMARY KEY, Code VARCHAR (100))
source share