- SQL Queries Part 1 - Writing basic queries
- SQL Queries Part 2 - Sorting queries in SQL
- SQL Queries Part 3 - Using Criteria in Queries
- SQL Queries Part 4 - Creating Calculations in Queries
- SQL Queries Part 5 - Using CASE Statements
- SQL Queries Part 7 - Using Functions in Queries
- SQL Queries Part 8 - Calculations with Text
- SQL Queries Part 9 - Calculations with Dates
- SQL Queries Part 6 - Using Joins in Queries
- SQL Queries Part 10 - Grouping and Aggregating Data
- SQL Queries Part 11 - Subqueries
- SQL Queries Part 12 - Correlated Subqueries
- SQL Programming Part 1 - Stored Procedure Basics
- SQL Programming Part 2 - Stored Procedure Parameters
- SQL Programming Part 3 - Variables in SQL
- SQL Programming Part 4 - Output Parameters and Return Values
- SQL Programming Part 5 - IF Statements in SQL
- SQL Programming Part 6 - WHILE Loops
- SQL Programming Part 7 - User Defined Functions
- SQL Programming Part 8 - Temporary Tables
- SQL Programming Part 9 - Table variables
- SQL Programming Part 10 - Table-Valued Functions
- SQL Programming Part 12 - Cursors
- SQL Programming Part 11 - Common Table Expressions (CTEs)
- SQL Programming Part 13 - Dynamic SQL
- SQL Programming Part 14 - Transactions
- SQL Programming Part 15 - DML Triggers
- SQL Programming Part 16 - DDL Triggers
- SQL Programming Part 17 - The Pivot Operator
- SQL Programming Part 18 - Dynamic Pivot Tables
VIDEOS BY AUTHOR
VIDEOS BY YEAR
SQL videos | SQL Programming Part 12 - Cursors
Posted by Andrew Gould on 26 March 2013
Most of the operations you perform in SQL work against an entire set of records in one go. Cursors, on the other hand, allow you to process a set of records one row at a time. In this video you'll learn how to declare a cursor and how to make it step through a set of records. Along the way you'll learn about the various FETCH statements and additional cursor options. From a practical point of view you'll see how to execute a stored procedure against each record in a table and how to use a cursor to update data in a table by creating a running total column.
You can play this video on SQL Programming Part 12 - Cursors here (see viewing hints below also).
You can increase the size of the video:
You can view the video in full screen mode as shown on the left, using the icon at the bottom right of the frame.
You can also increase the quality of the video:
You can improve the resolution of the video using another icon at the bottom right of the frame. This will slow down the connection speed, but increase the display and sound quality. This icon only becomes visible when you start playing the video.
Finally, if nothing happens when you play the video, check that you're not using IE in compatibility view.