Day 14. Using Cursors

In the last few days you have learned about the different topics that help you in working with the data in your database. All the operations that you perform on the data in the database are performed on a complete set of rows. The set of rows, or result set, that is returned by a SELECT statement includes all the rows that satisfy the WHERE clause of the statement. Most applications cannot always work effectively with the entire result set as a unit. You need a way to work with one row or a small set of rows at one time.

Cursors give you the ability to request a result set, using a SELECT statement, and then to deal with the data on a row-by-row basis. Today, you will learn what cursors are and how to use them, including ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.