I ran this query on my SQL Server database:
begin transaction;
insert into [db].[a].[Table1] ( [IsDeleted], [itemId], [regionId], [deskId], [LastUpdated], [LastUpdatedby])
select [IsDeleted], [itemId], [regionId], 11, [LastUpdated], [LastUpdatedby]
from [db].[a].[Table1]
where deskId = 12;
update [db].[a].[Table1]
set deskId = 3
where deskId = 12;
commit transaction;
there are records that should have changed but it said (O rows affected).
i now went to do a:
Select * from [db].[a].[Table1]
and its just spinning with "Executing Query" for minutes now with no end in site.
- Does anyone see anything wrong with my first query that would cause some type of lock issue.
- Also, now that i am in this state, how do i get out of it?