Re: Wildcard in MySQL Patrick Vanhoucke wrote:
> --- English - Engels ---
>
> In MySQL, the percent sign % is the wildcard. This wildcard
> represents one or more characters, i.e. differentiation between one
> or more characters isn't possible in a straightforward way. Is
> there a way to avoid this limitation? I would like to build a
> search interface that offers the possibility for the user to choose
> between a wildcard that represents exactly one character and a
> wildcard that represents one or more characters.
>
> --- Engels - English ---
You can use the _ underscore symbol to represent a single character while
using a like statement..
Select * from mytable where colname like '__';
would match any record of only 2 characters in length in this simple
example. |