- **EDIT**: @Martin shows a good case where Cursors out-perform set-based operations fairly dramatically- **EDIT**: Set-based operations literally _cannot_ `Execute` stored procedures, etc..
- **EDIT**: Set-based operations are exponentially slower than row-by-row when it
我已经创建了一个触发器,它根据另一列(colY)中的值更新表中的一列(比方说colX)。可以插入或更新colY,如果colX为空,则应将其设置为colY的值。问题是我有一个文件上传,它在这个表中插入了大量记录,并填充了colY。大多数时候,colX也会被填满,但如果它没有填满,我希望这个触发器能帮我完成它。这是我的触发器:BEFORE INSERT OR UPDATE ON TAB1FOR EACH ROW
i