Exploring some differences between using cursors, local fast forward cursors and using set logic.
Cursors are considered by many to be the bane of good T-SQL. What are the best ways to avoid iterative T-SQL and to write queries that look and perform beautifully? In the next part of an ongoing series, we look at ways to efficiently retrieve recently modified data.
In this article, we provide a simple way to get a comma delimited list from a table of entries without having to use a CURSOR or a WHILE loop to read through the table.
Cursors provide a means of processing through a set of records row-by-row. However, many companies have a policy against using cursors in their SQL Server standards. This article examines the problem with cursors and alternatives to using them.
Sometimes cursors are necessary when executing queries in SQL Server, but most of the time they can be avoided entirely. This article shows where cursors can traditionally be used, and how you can use features packaged in SQL Server 2005 to avoid them.