OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: How to Query by First Part of a VARCHAR?

From: gary (byotekitmail.com)
Date: Wed Jul 04 2007 - 17:21:42 CDT


the thing to remember is that if you only want strings that start with
CAT you'd never want to query with %CAT% because this could match
DOG_CATHY.

% is a wildcard that matches any number of characters including none.

if you want to match a single character you use _

if you actually need to search for _ or % you can escape them with a
backslash \% or \_

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql