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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access