If you are using Microsoft SQL Server 2008 there are some cool new additions to the T-SQL syntax that can help save you a few keystrokes. For example, with T-SQL 2008 you can now (finally) assign a value to a variable when it is declared, like so:
DECLARE @ThisIsLikeSo int = 1984
Rather than having to put the declaration and assignment on two separate lines.
T-SQL 2008 now includes the standard shorthand operators that have been standard in C++/Java/C# and were added to VB several years ago, things like +=, *=, -=, and so on.
But the neatest new T-SQL syntax is row constructors, which provides a terse syntax for declaring a set of records and are not unlike object initializers in higher-level languages. Want to insert four records into a table? In the past you'd have to write four separate INSERT statements, but with row constructors you can write one INSERT statement with four row constructors in the VALUES part:
-- Add four records to the Employees table
INSERT INTO Employees(Name, Email, Salary)
VALUES('Scott', 'scott@example.com', 50000.00),
('Jisun', 'jisun@example.com', 225000.00),
('Alice', 'al@example.com', 75000.00),
('Sam', 'sam@example.com', 45000.00)
My latest monthly tip at DotNetSlackers.com summarizes the new T-SQL 2008 features that will help you write more terse stored procedures, UDFs, and ad-hoc scripts: More Concise T-SQL with SQL Server 2008.