Welcome to EMC Consulting Blogs Sign in | Join | Help

SSIS Junkie

Once upon a time this blog was a hive of activity. Now however its pretty lifeless as you can probably tell so if are pining for more of the same you can find me over at http://sqlblog.com/blogs/jamie_thomson. I look forward to seeing you there!

Katmai: New T-SQL enhancements

A very short post here showing some of the new T-SQL constructs in katmai.

Check out the following code snippet:

declare @i int = 1;

set @i += 1;

 

create table t1 (col1 int);

insert t1 values (@i),(@i+1);

 

There are actually three syntax enhancements in there. Can you spot them? No? Let me fill you in:

  • Initialisation at the same time as declaration
  • += operator   (which works in the SET clause of an UPDATE statement as well)
  • Multiple row predicates in the VALUES clause

Of course, none of these enhancements enable you to do something you can't do already - but they do mean less typing. Upon seeing this for the first time SQL MVP Kent Tegels was overheard muttering "Its T-SQL#"

 

-Jamie

 

Posted to Microsoft (RSS feed), Katmai (RSS feed), SQL Server (RSS feed) & T-SQL (RSS feed)

 

 

Technorati tags: , ,
Published 04 June 2007 02:03 by jamie.thomson

Comments

 

Scott said:

They we're too hard to spot, that's for sure.  I was thinking was Kent said, too.

June 4, 2007 20:36
 

Professional Association for SQL Server (PASS) SIG said:

June 8, 2007 00:59
 

SSIS Junkie said:

Back in June I talked about some T-SQL enhancements that are coming our way in SQL Server 2008. One of

August 17, 2007 20:40
 

Louis Davidson said:

I have already given a rundown of most everything PASS here on my personal blog, including a series of

September 25, 2007 07:04
New Comments to this post are disabled

This Blog

Syndication

Powered by Community Server (Personal Edition), by Telligent Systems