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 […]

Blogs

A New Word: Apolytus

By

apolytus– n. the moment you realize you are changing as a person, finally outgrowing...

Tired of Tedious SQL Queries? AI Tools Can Automate The Boring Parts

By

If you've ever wrestled with complex SQL code, you know the drill. Hours spent...

Check your regions people

By

Today I was having a nice discussion with some colleagues about Fabric and pricing/licensing...

Read the latest Blogs

Forums

Issues backing up Analysis Services databases - silent failures

By Pete Bishop

I have a PowerShell script that I use to automate the backup of Analysis...

Read Only Replica in SQL Server Standard

By Stewart "Arturius" Campbell

Comments posted to this topic are about the item Read Only Replica in SQL...

Identifying Customer Buying Pattern in Power BI - Part 1

By Farooq Aziz

Comments posted to this topic are about the item Identifying Customer Buying Pattern in...

Visit the forum

Question of the Day

Read Only Replica in SQL Server Standard

Our environment runs using SQL Server Standard. We are implementing Availability groups. Our database has been experiencing high read volumes, so I want to let the application read the Synchronized Secondary replica, as I read that HADR does this. Can we implement this?

See possible answers