Write For Us

SQL Server Programming Part 12 - Cursors

Sponsored Post Vitamin D2 Canada Persia
307 Views
Published
By Andrew Gould

http://www.wiseowl.co.uk - 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 download the script to create the Movies database used in this video at the following link:
http://www.wiseowl.co.uk/files/execise-question-files/qf-898.zip

For more technical details on the various cursor options see:
http://msdn.microsoft.com/en-gb/library/ms180169.aspx

You can see the range of resources and courses we offer in SQL Server here:
http://www.wiseowl.co.uk/sql/

Visit www.wiseowl.co.uk for more online training resources in Microsoft Excel, Microsoft Access, Microsoft PowerPoint, Microsoft Word, Microsoft Project, Microsoft Publisher, Microsoft Visio, SQL Server, Reporting Services, Analysis Services, Visual Studio, ASP.NET, VB.NET, C# and more!
Category
Tech
Sign in or sign up to post comments.
Be the first to comment