Let's change your question to "Do I have to commit a transaction after running a SELECT statement?" Hopefully you'll agree that's an equivalent statement.
So I searched the web with that question, as one does. I found several web pages about features specific to certain databases. But here's an answer which I found in various forms several times, of which I thought this version was the best:
Have to say, I've never encountered any of those situations where they suggested confirming after doing a SELECT. I've never even encountered a case where I needed to worry about isolation level either.
This has been an ongoing puzzle for me as well. In theory, a SELECT should not need a COMMIT, since a COMMIT is the signal to post changes to the database and a SELECT is read-only.
But in practice, I've had apps give me grief if I didn't COMMIT after I'm done with a SELECT. I suppose that COMMIT could be considered as a signal that the data is no longer needed and buffers can be freed, but in that case. it's really not the best word to describe things.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!