-1

I was reading about transactions in DBMS. Just get started with it. But I am super confused with one concept.

enter image description here

Suppose initially A=100

For T1 A=100 and doing A = A-50

For T2 temp would be 10 and change A=90. So T2 would write A=90.

Now when T1 is doing write(A) then it should write A=50 because it has done A=A-50. But it is showing T1 is writing A=90 same as T2.

Why it is happening?

Hash Blog
  • 19
  • 2
  • Please avoid posting [images](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question) of data, example data should be *text* in your question. – Stu Jan 12 '22 at 15:09
  • @Stu Okay but what is correct ans for it? – Hash Blog Jan 12 '22 at 15:10

1 Answers1

0

If A is a variable then it's context is shared accross the program, you should try to use a temporary value in calculations.

Simayile
  • 1
  • 2