From --CELKO--@21:1/5 to All on Fri Aug 14 17:54:12 2015
Your mindset is wrong. SQL is a declarative language and does not use procedural constructs. Things happen "all at once" in whole sets, not in sequential steps. This means we have no loops. A classic book on this topic is Peter Henderson's FUNCTIONAL
PROGRAMMING.