O'Reilly logo

Inside Microsoft® SQL Server™ 2005: T-SQL Querying by Dejan Sarka, Lubor Kollar, Itzik Ben-Gan

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

Updating Data

This section covers several aspects of updating data, including UPDATEs using joins, UPDATE with OUTPUT, and SELECT and UPDATE statements that perform assignments to variables.

UPDATE Using Joins

Earlier in this chapter, I mentioned that T-SQL supports a nonstandard syntax for modifying data based on a join, and I showed DELETE examples. Here I’ll cover UPDATEs based on joins, focusing on cases where the nonstandard syntax has advantages over the supported standard syntax. I’ll show that SQL Server 2005 introduces simpler alternatives that practically eliminate the need for the older UPDATE syntax that uses joins.

I’ll start with one of the cases where an UPDATE based on a join had a performance advantages over the standard UPDATE supported ...

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