On Wed, February 17, 2010 09:24, Cantwell, Bryan wrote: > Is there a simple function or method to compare a value in a column to one > or more items in a comma separated list? > > select * from table where value <contains one of> > ('apple','orange','banana'); > > and say value may = something like > 'produce(grape,orange,pear,apple,lettuce)' > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=mussa...@csz.com > > IN('value1','value2') should work for exact matches, also works for integer values.
------ William R. Mussatto Systems Engineer http://www.csz.com 909-920-9154 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org