T-SQL – syntactic sugar for updating current row in cursor

I am not a big fan of cursors, however for time to time I have to write one. In my case cursor usually is responsible for some complicated updates. Until yesterday I’ve been writing my update statements within the cursor the standard way

There is nothing wrong with that, however we can do the same thing using specialized syntax – current of keyword(s)

The entire cursor statement then looks that way

T-SQL – syntactic sugar for updating current row in cursor