Learning Curve…

What is the difference between a local and a global variable in SqlServer?

Posted on: November 3, 2011

Local Variable:

The scope or lifetime of the local variable is within a block or procedure..

E.g.: DECLARE @Variable1

Global Variable:

The scope or lifetime of the global Variable throughout the execution of the program.

E.g.: DECLARE @@Variable1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Author

Learning days (Calendar)

November 2011
M T W T F S S
« Oct   Dec »
 123456
78910111213
14151617181920
21222324252627
282930  

Knowledge Bank (Archives)

I am on Twitter

Blog Stats

  • 507,854 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 43 other followers

%d bloggers like this: