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

Tomorrow: Webcast on SQL Server security

By

Tomorrow, April 16, 2024, I will be giving another webcast; this one will be...

A New Word: the Wends

By

the wends– n. the frustration that you’re not enjoying an experience as much as...

7 Best Online Advanced SQL Training Courses to Learn in 2024 and Beyond

By

The world runs on data, and SQL is the key to unlocking its secrets....

Read the latest Blogs

Forums

Expression Error ( property 'Error' cannot be selected )

By rjdineen

Hello there. I have the following Pipeline I want to get the property error...

create cluster fails Win2016.

By snomadj

I'm installing a cluster prior to my 2019 SQL build.   Failover Cluster tools...

Dependency Cycle in Database with Update Approvals

By ahlembreath

I'm struggling with a dependency cycle in my SQL database schema. Here's the situation:...

Visit the forum

Question of the Day

Express In-Memory OLTP

Can I create In-Memory OLTP tables in SQL Server Express?

See possible answers