SQL is intended as a declarative query language. That it is not the correct tool for imperative processing of updates feels expected? And mostly fine?
Fair that things often grow beyond their original intent.
You run into the same issues without using the weird imperative syntax in this article.
You run into the same issues without using the weird imperative syntax in this article.