I want to do searching some pattern in the database from my application.
But my DB query is not working.Gives Syntax error near “%”: while compiling: SELECT _id,note From Notes Where note=%?
public Cursor getAll(String id) {
String[] args = { id };
return (getReadableDatabase().rawQuery(
"SELECT _id,city From City Where city=%?%", args));
}
Try this