I imagine that the DBMS is converting the string to an integer on the fly,
which will lower performance of the query.  So yes, I think that would be
considered bad practice unless it's necessary.

 
Matthew Small
Web Developer
American City Business Journals
704-973-1045
[EMAIL PROTECTED]
 

-----Original Message-----
From: Richard Cooper [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 30, 2005 9:46 AM
To: CF-Talk
Subject: SQL statements

Hi,

With SQL statements it normal not to encase integers within single quote
marks, right? 

But with SQL server, when doing a select statement, if the where clause
column is an integer you can choose to have or not have the single quote
marks with seamingly no difference. 

Is it OK to have these single quote marks or is it deemed bad practice for
any reason?


Thanks,

Richard



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219752
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to