O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Row-by-Row Versus Set-Oriented Processing

You can apply a specific business process to a group of rows, in two completely different ways:

  • Navigate the result set in the way you prefer, and apply the business process to every row individually, sending one or more Transact-SQL statements to SQL Server for every row.

  • Send to SQL Server a single Transact-SQL statement that describes how to apply the business process to the entire result set, and let SQL Server decide how to apply it, in the optimal way.

I'll explain the difference between these two ways with a practical example.

Consider it is the end of the year and you want to increase product prices by 5%. The manual process will involve modifying each product's UnitPrice. The automatic process ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required