Stairway to Advanced T-SQL

Stairway to Advanced T-SQL Level 4: Record Level Processing Using Transact-SQL Cursors

Using a CURSOR is not normally the best way to process through a set of records. Yet when a seasoned programmer moves to writing TSQL for the first time they frequently look for ways to process a sets of records one row at a time. They do this because they are not used to thinking about processing records as a set. In order to process through a TSQL record set a row at a time you can use a cursor. A cursor is a record set that is defined with the DECLARE CURSOR statement. Cursors can be defined as either read-only or updatable. In this article I will introduce you to using cursors to do record level processing one row at a time.

Blogs

A New Word: Mottleheaded

By

mottleheaded – adj. feeling uneasy when socializing with odd combinations of friend and family,...

Microsoft Purview GA menu’s

By

The new data governance features in Microsoft Purview are now being made generally available...

Connect to Power BI as a Guest User in another Tenant

By

Sometimes your Microsoft Entra ID account (formerly known as Azure Active Directory) is added...

Read the latest Blogs

Forums

GIT Configuration and Automated Release for Azure Data Factory

By Sucharita Das

Comments posted to this topic are about the item GIT Configuration and Automated Release...

I have never seen an insert statement with -= tablename in place of values

By lee.hopkins

We have a third part software and looking at some of their SQL we...

Automate reports for when the SQL database was last used

By PreethiKenchappa1

Hi, I'm working on cleanup activity of deleting databases that aren't in use or...

Visit the forum

Question of the Day

Disable All the Indexes

How do I disable all the indexes on the dbo.Logger table?

See possible answers