Guru: Concerning The Stepping-On Of Feet
October 19, 2020 Ted Holt
It has come to my attention that once again I did not tell the truth, the whole truth, and nothing but the truth. In Three Suboptimal I/O Practices, I said that a simple SELECT INTO was preferable to a cursor that fetches one row. It turns out that there is at least one situation in which SELECT INTO will not serve the purpose, and one has no choice but to use a cursor that fetches one row.
The situation is this: the program must lock the fetched row for update. Despite its power and simplicity, SELECT INTO cannot lock …
Read more