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 inside triggers to apply row-by-row processing in a

  • multirow operation

  • How to use application cursors

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.65.247