they are essentially the same statement.  the optimizer of your database
will translate them the same.  IN is "cleaner" operator to use if you have
multiple ORs, though.  makes it easier to understand your SQL statement.

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-----Original Message-----
From: Duane Boudreau [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 1:54 PM
To: CF-Talk
Subject: SQL Question


Which is more efficient?

WHERE x = 1 OR x = 2 OR x = 3

OR

WHERE x IN (1,2,3)


Duane
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to