set-based

When are TSQL Cursors the best or only option?

风流意气都作罢 提交于 2019-12-17 19:18:36
问题 I'm having this argument about using Cursors in TSQL recently... First of all, I'm not a cheerleader in the debate. But every time someone says cursor , there's always some knucklehead (or 50) who pounce with the obligatory 'cursors are evil' mantra. I know SQL-Server was optimized for set-based operations, and maybe cursors truly ARE evil incarnate, but if I wanted to put some objective thought behind that... Here's where my mind is going: 1) Is the only difference between cursors and set

RBAR vs. Set based programming for SQL

有些话、适合烂在心里 提交于 2019-11-26 19:08:14
Having read this link on RBAR and this , my understanding of RBAR amounts to this: Anything that have loops and cursors Anything that's not set based I know this sounds kinda wholly which is why I am asking if anyone has a more elegant explanation as to what set-based programming is (within SQL context). Set-based programming is based upon the mathematical concept of a set, and has operators that work on a whole set at a time. Procedural (RBAR) programming is based more on the traditional computer concepts of files and records. So to increase the salary of all employees in department X by 10%:

RBAR vs. Set based programming for SQL

廉价感情. 提交于 2019-11-26 06:49:23
问题 Having read this link on RBAR and this, my understanding of RBAR amounts to this: Anything that have loops and cursors Anything that\'s not set based I know this sounds kinda wholly which is why I am asking if anyone has a more elegant explanation as to what set-based programming is (within SQL context). 回答1: Set-based programming is based upon the mathematical concept of a set, and has operators that work on a whole set at a time. Procedural (RBAR) programming is based more on the