blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

SSIS Junkie

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

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

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

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

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