The sum of all SQL Server matter that exist,
and the space in which all SQL Server events
occur or could occur.
Welcome to SQL Server Universe.com Sign in | Join | Help
in
Home SS SLUG Forums Articles Photos Downloads

T-SQL Enhancements in SQLS 2008

Last post 05-22-2008, 11:11 by Anu. 0 replies.
Sort Posts: Previous
  • T-SQL Enhancements in SQLS 2008

     05-22-2008, 11:11

    Anu
    • Joined on 05-28-2007
    • Posts 2
    • Points 0
    • Top 50 Contributor

    Dinesh Asanka has missed out one significant syntax improvement in SQLS2008 in his 2 articles on the subject. That is; the ability to Declare and Assign a value to a Variable in one statement.

    According to the “Introduction to the SQL Server 2008 by Peter DeBetta” e-book, now it’s possible to declare & assign a variable as below;

    DECLARE
        @someIntVal INT = 1,
        @someStringVal = 'one'

    Instead of as below;

    DECLARE
        @someIntVal INT,
        @someStringVal varchar(100)
    SET @someIntVal INT = 1
    SET @someStringVal = 'one'

View as RSS news feed in XML

(Best viewed with a resolution of more than 1024 * 768)

Powered by Community Server, by Telligent Systems