Back to Browse

Seven different ways to use the CURSOR in SQL Server

2.5K views
Jul 5, 2021
8:41

Learn how to loop through a result set using the CURSOR. I will show you SEVEN different ways to use this incredible feature of SQL Server. TimeLine 00:18 - Introducing the most BASIC cursor 01:44 - fetch next from CURSOR into @field1, @field2 03:30 - use TRY/CATCH around a CURSOR 04:44 - use TRY/CATCH but, THROW an ERROR 06:00 - use CURSOR "scroll" -absolute/relative 06:51 - use CURSOR "scroll" -last/prior "show reverse order" 07:25 - use CURSOR forward_only read_only - a fast way #softwareNuggets, #sqlServer, #cursor

Download

1 formats

Video Formats

360pmp412.8 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Seven different ways to use the CURSOR in SQL Server | NatokHD