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

Reading JSON Data with Python

By

Recently I’ve been looking at archiving some data at SQL Saturday. As a start,...

5 Advanced Online SQL DBA Training Courses to Learn in 2024 and Beyond

By

Buckle up, database wranglers! Nowadays, SQL DBAs hold the keys to a company's most...

Dynamically Unpivot columns in SQL

By

Picture this, your data ingestion team has created a table that has the sales...

Read the latest Blogs

Forums

Crazy Interviews

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Crazy Interviews

The Query Traceflag

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Query Traceflag

Using Machine Learning Pipeline Execution Activity in Azure Data Factory

By Sucharita Das

Comments posted to this topic are about the item Using Machine Learning Pipeline Execution...

Visit the forum