Chapter 12. Row-Oriented Processing: Using Cursors

In previous chapters you learned how SQL Server processes complete result sets. SQL Server is optimized to work with operations that affect complete result sets, and Query Optimizer decides in which order to process the rows to get the job done in the most efficient way.

In some cases, you would be required to process individual rows from a result set in a specific order and, in these cases, you can use cursors. SQL Server supports Transact-SQL cursors and application cursors.

This chapter teaches you

  • The differences between set- and row-oriented processing

  • The type of cursors and when to use them

  • How to implement Transact-SQL cursors

  • The scope of cursors

  • How to use cursor variables

  • How to use cursors ...

Get Microsoft® SQL Server™ 2000 Programming by Example 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.