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
 Variable Declaration

Author  Topic 

harsh.dhawan
Starting Member

10 Posts

Posted - 2008-08-12 : 05:00:17
Hi Friends

I am going through a piece of code in SQL server. My programmer has declared around 20-25 variables in his program which are not used anywhere in it.

What will be the after affects of declaring the variables and not using them in the procedure?

Cheers

Harsh Dhawan

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-12 : 05:06:30
why do you want them if you're not using them?
Go to Top of Page

harsh.dhawan
Starting Member

10 Posts

Posted - 2008-08-12 : 05:10:56
Thanks for your reply.. yes, i completely agree with you that i don't need to declare these variables but i want to know will there be any affect on the application performance by declaring unnecessary variables.

Thanks...

Harsh Dhawan
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-12 : 05:51:39
Not much.
An unused variable only occupies a few bytes in memory.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -