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.

SQLServerCentral Editorial

To Each Their Own

I recently came back from a trip to Las Vegas. I was privileged to be able to take part in the very first Fabric Community Conference. It was a great event, well attended. BUT... It was in Las Vegas. I am not a fan. First of all, Vegas is just far too noisy for me. […]

Blogs

Rebuilding a SQL Server Database Transaction Log

By

“Could you help me, we deleted the database’s transaction log file and now that...

Copying Content from One Databricks Unity Catalog Catalog to Another

By

I had a couple of clients who were moving content from development catalogs to...

Dumping and Restoring Azure PostgreSQL Databases

By

I wanted to test a migration of Azure PostgreSQL from simple to flexible. I...

Read the latest Blogs

Forums

Diving Deeper into the Import Extension in Azure Data Studio

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Diving Deeper into the Import...

List of objects that require VIEW SERVER STATE permission

By SQL Guy 1

Hi all, I need a list of objects (DMV's and probably other objects) that...

Memory grants pending root cause

By sqlfriend

Recently I got sql alerts from one of QA servers, every 2 or 3...

Visit the forum

Question of the Day

Enable a Disabled Index

I have disabled the LoggerCI index on the dbo.Logger table. How do I enable it?

See possible answers