Thursday, March 24, 2011

Inline variable assignment in sql server 2008

Instead of:

DECLARE @myVar int
SET @myVar = 5

you can do it in one line:

DECLARE @myVar int = 5

No comments: