Forum Discussion
DrDeadPan
Jun 28, 2024Copper Contributor
T-SQL : INSERT INTO SELECT Issues - READ UNCOMMITTED ISOLATION LEVEL
So we've have some strange issues appear in our Production system and we think it comes down to a stored procedure (SQL Server 2019) that employs an INSERT INTO SELECT clause. Here is a sample sn...
olafhelper
Jul 01, 2024Bronze Contributor
My understanding has always been INSERTION of rows does not begin until the dataset has been retrieved from the subquery. Is this correct?
DrDeadPan , more or less.
A DML statement is always an "all-or-nothing", if during execution an error occurs, a transaction rollback comes in place.
And for the rest: I don't have your database to test anything.
- DrDeadPanJul 01, 2024Copper Contributor
olafhelper Thanks for the response. That was my undersatnding as well. I can test the rest myself but with the unpredicatability with what I am seeing, I am not sure it would yield consistent results each time. Thank you again.