Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

SQL Server - Scope of variable in a declare statement

Jul 16 2011 3:41AM by Madhivanan   

While you know that a variable can be initialized to another variable in the declare statement.(You can refer this post http://beyondrelational.com/justlearned/posts/352/sql-server-variable-value-can-be-directly-assigned-to-another-variable-during-declaration.aspx), It is not possible to have them declared in a single declare statement like below

declare @v1 varchar(10)='test', @v2 varchar(10)=@v1
The above throws the error "Must declare the scalar variable "@v1".

Read More..   [0 clicks]

Published under: SQL Server Tips ·  ·  ·  · 


Madhivanan
3 · 39% · 12440
12
 
7
 
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

2  Comments  

  • Makes complete sense..Thank-you for sharing!

    commented on Jun 2 2012 1:57PM
    Nakul Vachhrajani
    4 · 33% · 10587
  • Logical.. Thanks for sharing.

    commented on Jun 7 2012 12:42PM
    Hardik Doshi
    20 · 9% · 2839

Your Comment


Sign Up or Login to post a comment.

"SQL Server - Scope of variable in a declare statement" rated 5 out of 5 by 12 readers
SQL Server - Scope of variable in a declare statement , 5.0 out of 5 based on 12 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]