Hello
In SQL Server
I have two user 1st User_1 and 2nd User_2
At Same Time both user (User_1 & User_2)
User_1
Update Col X=Y (Set X = Y)
User_2
select Col
So what select will select X or Y
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Aug 13, 2015, 7:51 PM EDT
Hi,
It is depending upon Isolation level set to SQL server.
If it is equal or higher than the read committed than SQL server wait until update statement finish it task.
If it is set to read uncommitted than it will show you old (not committed) data.
One more thing you can make select your query as read uncommitted by using nolock keyword.
select * from cols(nolock)
hope this will help you.
Sumit JoshiRank #1,252 · 1.4K reputationPosted Aug 13, 2015, 5:23 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 13, 2015, 8:12 AM EDT