O'Reilly logo

Programming Microsoft® SQL Server™ 2008 by Leonard Lobel, Andrew Brust, and Stephen Forte

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

New T-SQL Shorthand Syntax

If you write a lot of T-SQL code, you will definitely appreciate these minor (but extremely handy) enhancements to the language syntax. These features may pale in the face of everything else new in SQL Server 2008, but they are welcome timesavers just the same and further demonstrate Microsoft’s continued investment and innovation in T-SQL.

We can finally declare and initialize variables with a single statement, and compound assignment operators are supported as well. Plus, row constructors allow you to build multiple rows of data inline. For example, you can now insert multiple rows of data with a single INSERT statement that wraps the operation in an implicit transaction. Example 2-72 shows the applied use of all of ...

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