I am getting the rows in different order when I use
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
in my stored procedure.
Below is the query defined in the stored procedure.
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT CaseRateDetailId,AmtPerWeek
FROM CaseRateDetails
WHERE CaseRateInfoId = @CaseRateInfoId
It returns AmtPerWeek like this:
10000,15000,5000,20000,25000,..
When I run the same query without using
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
statement it returns the rows in the correct order i.e. 5000,10000,15000,20000,25000,....
I can use the order by AmtPerWeek clause in above query but I want to know the reason why it is behaving like this? Why it is changing the order of rows?