I am making an application which search messages in the inbox based on sender number. Here is my code:
public void onClick(View v)
{
Toast.makeText(this,
There is two joker : "%" and "_".
"%" is replacing any string (multiple characters),
"_" is replacing one (and only one) character.
For example :
LIKE 'B%'
let you find everything which starts with "B". (like "BATMAN");
LIKE '%B%'
let you find everthing which contains "B". (like "ABBA");
LIKE'_B%'
let you find everything which contains ONE caracter, then a "B". (like "ABERCROMBIE)".
if you want to retrieve a string which contains "%" or "_", you may use an escape caracter :
LIKE '%#_B%' ESCAPE #
let you find any strings which contains one "_" followed by a "B". (like "TEST_BATMAN").
I hope that helped.
Al_th