Message
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Quick question - what is better parameter or Field value
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01326528
Message ID:
01326528
Views:
49
Hi everybody,

I'm just wondering what would be better in your opinion:
SELECT Registration.*, Schools.SchoolPhone
		FROM dbo.Registration LEFT JOIN Schools ON Registration.School = Schools.School 
AND Schools.SiteID = @SiteID
        WHERE RegistrationID = @RegistrationID
or
SELECT Registration.*, Schools.SchoolPhone
		FROM dbo.Registration LEFT JOIN Schools ON Registration.School = Schools.School 
AND Registration.SiteID = Schools.SiteID
        WHERE RegistrationID = @RegistrationID
In other words, is it better to use parameter or field value? In the first case I would need to adjust several pages to add an extra parameter.

Thanks a lot in advance.

On the second thought - why do I care for one record return? LOL.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View