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 Article

SQL Server 2022 Build List

This is a list of the builds for SQL Server 2022. There are other build lists available here. A list of all the builds that I can find and install on my Build VM. If you find a build not listed here, please let the webmaster know (webmaster at sqlservercentral.com). All builds are listed in reverse […]

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

Bicep Your Elastic Jobs

By

I posted on Terraform and Azure SQL last year but wanted to see what...

3rd Party Applications Have Issues

By

As a SQL DBA, what do you do when a vendor application has performance...

Check Azure SQL DB Space Used

By

A couple of days ago I was doing some cleaning on some Azure SQL...

Read the latest Blogs

Forums

The On-Call Load

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The On-Call Load

Two Table Hints

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Two Table Hints

Database Dashboards in Azure Data Studio

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Database Dashboards in Azure Data...

Visit the forum

Question of the Day

Two Table Hints

What happens when I run this code:

SELECT
  p.ProductName
, p.ProductCategory
FROM dbo.Product AS p WITH (NOLOCK, TABLOCK);

See possible answers