Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Variable Declaration Expand / Collapse
Author
Message
Posted Tuesday, August 12, 2008 2:01 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 12, 2008 4:15 AM
Points: 6, Visits: 23
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
Post #550792
Posted Tuesday, August 12, 2008 4:11 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, April 22, 2014 6:56 AM
Points: 1,330, Visits: 1,434
Hello,

I would not expect this to cause any problems. The SP(?) will take up slightly more Server memory when executing.

If the variables are not used anywhere in the code then it would be straight forward to remove the declarations.

Regards,

John Marsh


www.sql.lu
SQL Server Luxembourg User Group
Post #550841
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse