January 14, 2020 at 11:38 pm
I am trying to understand how committed data works in a transaction. I have 4 screenshots attached to document my process.
Here are my questions.
Update: Since posting this, there were times when I was able to get step 4 to display the SELECT statement results without running endlessly. I can't pintpoint exactly what I did in those cases. It seems like might have something to do with running multiple statements at once, e.g. running COMMIT and SELECT at the same time. Not sure if this is the cause of step #4 above, but it's merely speculation.
January 15, 2020 at 1:34 am
The problem in step 4 is that you actually have 2 transactions in step 3 but have only committed once. In step 3, you run it once with COMMIT commented out. That's an open transaction (assuming that it contained a BEGIN TRANSACTION). Then, you uncomment the COMMIT and run step 3 again. That starts a 2nd transaction and the COMMIT commits that second transaction, but not the first. You either need to do a ROLLBACK or a COMMIT on the first run in step 3.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 15, 2020 at 10:35 pm
I think I've got it now. Thank you.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply