Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 When to use Variable?

Author  Topic 

SQLFOX
Starting Member

45 Posts

Posted - 2011-03-22 : 07:12:32
Hi,

I am currently learning about variables and have the following questions:

What are they used for?
Why would I 'SET' a variable?
When using a 'SET' variable, would I typically use it for calculations?
When would I use a SELECT in a declarative variable?

I seem to get variables confused with input parameters. Apologies if the above questions seem very basic but as stated I am currently learning!

Thanks guys!

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2011-03-22 : 07:22:05
These questions are best answered in Books On Line. Look there under variables [SQL Server]. They have some examples of how and when to use variables.

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

SQLFOX
Starting Member

45 Posts

Posted - 2011-03-22 : 07:36:52
Thanks Jim. Do you have a direct link to this information?
Go to Top of Page
   

- Advertisement -