I have been reading up on Transaction Isolation Levels and I am not sure I understand everything correctly. I need help.
Please consider the following Csharp pseudo code:
- Using Stored procedure 1, open transaction
- Insert or update table 1
- Using Stored procedure 2, insert or update table 2, based on data on table 1
- Commit transaction.
In step 3, how can I not consider the data that has been updated in step 2? Should I set a Transaction Isolation Level when I am creating a transaction in my .Net code. Here is the SQL server stored procedure pseudo code.
select @count=count(*) from table1;
if @count > 1
update table2