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
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Performance regarding to variable declare

Author  Topic 

chih
Posting Yak Master

154 Posts

Posted - 2008-10-23 : 19:45:15
Hi All,

when we declare variables in Stored Procedure, will it make any difference if we use only one single declare statement comparing many?
For example

delclare @id int, @name char(20), @dec char(200)
vs.
declare @id int
declare @name char(20)
declare @dec char(200)

Thank you in advance

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-10-23 : 19:46:46
It will make no difference. I prefer the first way.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -